PlayerSfxScript.Awake C# (CSharp) Method

Awake() public method

public Awake ( ) : void
return void
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            // Self-destruct if another instance exists
            Destroy(this);
            return;
        }
    }