Hey I am working on a game Its sounds work fine when I play on unity or play on android phone by build and run but when I use apk file and install on same phone sound are not working. I have no idea what’s going on any one please give any reference or help…
Working on window 10, unity 5
sound format : mp3 and ogg
shows error in logcat :
11-18 09:50:41.013 3710-3730/? E/Unity﹕ Error: Cannot create FMOD::Sound instance for resource sharedassets0.resource, (File not found. )
(Filename: Line: 845)
Script :
using UnityEngine;
using System.Collections;
public class PlayerControl : MonoBehaviour{
bool check = false;
AudioSource sounds;
public AudioClip coin;
public AudioClip treasure;
public AudioClip power;
public AudioClip g_power;
public AudioClip spring_up;
public AudioClip cheerUp;
void Start ()
{
sounds = GetComponent<AudioSource> ();
}
void Update ()
{
if (!check && Movement.gameStart) {
check = true;
}
}
void OnCollisionStay2D (Collision2D col)
{
if (col.gameObject.tag == "box" && GetComponent<Rigidbody2D> ().velocity.y <= 0)
Movement.inAir = false;
}
void OnTriggerEnter2D (Collider2D col)
{
if (UI.sfx) {
if (col.gameObject.tag == "coin")
sounds.PlayOneShot (coin, 1f);
else if (col.gameObject.tag == "treasure") {
sounds.PlayOneShot (treasure, 1f);
sounds.PlayOneShot (cheerUp, 1f);
}
if (GetComponent<Rigidbody2D> ().velocity.y <= 0) {
if (col.gameObject.tag == "green") {
sounds.PlayOneShot (g_power, 1f);
sounds.PlayOneShot (spring_up, 1f);
} else if (col.gameObject.tag == "blue") {
sounds.PlayOneShot (power, 1f);
sounds.PlayOneShot (spring_up, 1f);
}
}
}
}}