ChatGui.Awake C# (CSharp) Method

Awake() public method

public Awake ( ) : void
return void
    public void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(this.gameObject);
        }
        else if (instance != this)
        {
            Debug.LogWarning("Destroying duplicate instance of "+this.gameObject+". ChatGui applies DontDestroyOnLoad() to this GameObject.");
            Destroy(this.gameObject);
        }
    }