Beispiel #1
0
 private void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
         //DontDestroyOnLoad(this.gameObject);
     }
 }
Beispiel #2
0
    private void OnEnable()
    {
        _sounds = (ObjectSounds)target;
        EditorUtility.SetDirty(_sounds);

        if (_object == null)
        {
            _object = new GameObject();
            _source = _object.AddComponent <AudioSource>();
        }
    }
 void Start()
 {
     objectSounds = GetComponent <ObjectSounds>();
 }