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

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