Exemplo n.º 1
0
        private void Uninstall()
        {
            if (NetworkSkinPanelController.Instance != null)
            {
                NetworkSkinPanelController.Instance.EventToolStateChanged -= OnNetToolStateChanged;
                if (skinControllerGameObject != null)
                {
                    Destroy(skinControllerGameObject);
                    skinControllerGameObject = null;
                }
            }

            if (PersistenceService.Instance != null)
            {
                if (persistenceServiceGameObject != null)
                {
                    Destroy(persistenceServiceGameObject);
                    persistenceServiceGameObject = null;
                }
            }

            if (panel != null && panel.gameObject != null)
            {
                Destroy(panel.gameObject);
                panel = null;
            }

            defaultAtlas = null;
        }
Exemplo n.º 2
0
 private void OnNetToolStateChanged(bool isToolEnabled)
 {
     if (isToolEnabled)
     {
         panel = UIView.GetAView().AddUIComponent(typeof(NetworkSkinPanel)) as NetworkSkinPanel;
     }
     else
     {
         if (panel.gameObject != null)
         {
             Destroy(panel.gameObject);
             panel = null;
         }
     }
 }