public UISurfacePanelController ShowOnGUI() { if (observer == null) { observer = UISurfacePanelController.InitializeSurfaceObserverScript(); } else { observer.gameObject.SetActive(true); } observer.SetObservingSurface(this); return(observer); }
public UIObserver ShowOnGUI() { if (surfaceObserver == null) { surfaceObserver = Instantiate(Resources.Load <GameObject>("UIPrefs/surfaceObserver"), UIController.current.transform).GetComponent <UISurfacePanelController>(); } else { surfaceObserver.gameObject.SetActive(true); } surfaceObserver.SetObservingSurface(this); return(surfaceObserver); }