private void Awake() { if (_instance == null) { _instance = this; //DontDestroyOnLoad(this.gameObject); } }
private void OnEnable() { _sounds = (ObjectSounds)target; EditorUtility.SetDirty(_sounds); if (_object == null) { _object = new GameObject(); _source = _object.AddComponent <AudioSource>(); } }
void Start() { objectSounds = GetComponent <ObjectSounds>(); }