Question by
yanivng · Sep 10, 2017 at 09:53 AM ·
referencelostaudioclips array
References to AudioClip lost
Hi,
I have defined a class which holds the following information:
public class AudioInformation
{
[SerializeField]
private AudioClip[] _audioClip;
}
I am using this class in several other scripts, such as:
[SerializeField]
private AudioInformation _onDeathAudio;
Those scripts belong to a prefab, which is used to represent entities in the game. I'm setting the AudioClip references to some audio files using Unity editor. The problem is that when opening Unity (especially on MAC), some of the references are lost. Discard Unity changes and reopening the project usually works.
What am I doing wrong?
Thanks, Yaniv
Comment
Even when changing from AudioClip to UnityEngine.Object, some references are still lost.