// -------------------------------------------------------------------------------------------- public override void Destroy() { base.Destroy(); if (_instance == this) { _instance = null; } }
// -------------------------------------------------------------------------------------------- protected override void PostRender() { base.PostRender(); if (_instance != null) { Debug.LogError("An instance of UIWorldIteractionManager already exists!"); Destroy(); } else { _instance = this; } }
// -------------------------------------------------------------------------------------------- public static UIWorldInteractionPanel Create(Game game) { if (_instance != null) { Debug.LogError("An instance of UIWorldIteractionManager already exists!"); return(null); } UIWorldInteractionPanel toReturn = new UIWorldInteractionPanel(game); UIMainCanvas.Instance.AddChild(toReturn, UIPriorities.UIWorldInteractionPanel); return(toReturn); }