private void Open() { if (launcher != null) { return; } if (BasicOrbitLoader.ToolbarPrefab == null) { return; } GameObject obj = Instantiate(BasicOrbitLoader.ToolbarPrefab, GetAnchor(), Quaternion.identity) as GameObject; if (obj == null) { return; } obj.transform.SetParent(MainCanvasUtil.MainCanvas.transform); launcher = obj.GetComponent <BasicOrbit_AppLauncher>(); if (launcher == null) { return; } launcher.setOrbit(BasicOrbit.Instance); }
private void Close() { sticky = false; if (launcher == null) { return; } launcher.Close(); launcher = null; }