Esempio n. 1
0
 // Reset the Voxel Creation Editor - When GameShutting
 private static void Destroy()
 {
     if (s_Active)
     {
         QuitFinally();
     }
     VCEAssetMgr.Destroy();
     VCEHistory.Destroy();
 }
Esempio n. 2
0
 public void OnRedoClick()
 {
     if (VCEditor.s_ProtectLock0)
     {
         return;
     }
     if (VCEHistory.Redo())
     {
         VCEditor.ClearSelections();
         VCEditor.SelectedMaterial = VCEditor.SelectedMaterial;
         VCEStatusBar.ShowText("Redo".ToLocalizationString(), 2);
     }
 }
Esempio n. 3
0
    // Reset the Voxel Creation Editor - When GameLoading
    private static void Init()
    {
        s_Active = false;
        s_Ready  = false;
        VCEAssetMgr.Init();
        VCEHistory.Init();
        GameObject ui = GameObject.Instantiate(s_Instance.m_UIPrefab) as GameObject;

        ui.transform.parent        = s_Instance.m_EditorGO.transform;
        ui.transform.localPosition = Vector3.zero;
        ui.transform.localRotation = Quaternion.identity;
        ui.SetActive(true);
        s_Instance.m_UI = ui.GetComponent <VCEUI>();
        s_Instance.m_UI.Init();
    }
Esempio n. 4
0
 private void UpdateUndoRedoButtons()
 {
     if (VCEHistory.CanUndo())
     {
         m_UndoButton.enabled      = true;
         m_UndoButton.target.color = new Color(1, 1, 1, 1);
     }
     else
     {
         // m_UndoButton.enabled = false;
         m_UndoButton.target.color = new Color(1, 1, 1, 0.15f);
     }
     if (VCEHistory.CanRedo())
     {
         m_RedoButton.enabled      = true;
         m_RedoButton.target.color = new Color(1, 1, 1, 1);
     }
     else
     {
         // m_RedoButton.enabled = false;
         m_RedoButton.target.color = new Color(1, 1, 1, 0.15f);
     }
 }
Esempio n. 5
0
    // close current scene
    private static void CloseScene()
    {
        if (s_Scene != null)
        {
            Debug.Log("VCE close scene. sceneid = " + s_SceneId.ToString());
            if (OnSceneClose != null)
            {
                OnSceneClose(s_Scene);
            }
        }

        // Selection
        DeselectAllTools();
        DestroyBrushes();
        ClearSelections();

        // Destroy scene data
        DestroySceneData();

        // Temporary materials
        VCEAssetMgr.ClearTempMaterials();

        // Temporary decals
        VCEAssetMgr.ClearTempDecals();

        // Reset Some vars
        // Ref plane
        s_Instance.m_UI.OnSceneClose();
        VCERefPlane.Reset();

        // History manager
        VCEHistory.Clear();
        VCEHistory.s_Modified = false;

        // Mirror
        s_Mirror = null;
    }
Esempio n. 6
0
 public void Register()
 {
     VCEHistory.AddAction(this);
     VCEHistory.s_Modified = true;
 }