Ejemplo n.º 1
0
 public virtual void OnEnable()
 {
     if (Display == null)
     {
         Display = new EditorRenderer(InteractiveRendererDisplay);
     }
     Display.OnIsDirty += Repaint;
 }
Ejemplo n.º 2
0
        public void OnEditorGuiRender(IntPtr sceneRenderTexture)
        {
            EngineUtils.TryExecute(() =>
            {
                if (editorRenderer == null)
                {
                    editorRenderer = new EditorRenderer(sceneRenderTexture);
                }

                editorRenderer.Render();
            });
        }
Ejemplo n.º 3
0
    void OnDestroy()
    {
        coroutine = null;

        UniversalEditorUtility.SaveEditorLayout(this);

        if (rootCtrl == null)
        {
            return;
        }

        if (onDestroy != null)
        {
            onDestroy(this);
        }

        geometryTool.ReleaseAllGeometryObj();

        renderer.Destroy(rootCtrl);
        rootCtrl = null;
        EditorManager.GetInstance().RemoveEditor(editorName);


        onAwake                 = null;
        onEnable                = null;
        onDisable               = null;
        onUpdate                = null;
        onGUI                   = null;
        onDestroy               = null;
        onMessage               = null;
        onCoroutineMessage      = null;
        onCoroutineTaskFinished = null;

        renderer = null;
        GC.Collect();
    }
Ejemplo n.º 4
0
 //编辑器初始化,实例化后必需调用
 public void Init()
 {
     renderer    = new EditorRenderer();
     CtrlCounter = 0;
 }