Newer
Older
IsoRenderTest / Assets / Editor / IsoMenu.cs
@Mark Mark on 31 Oct 2019 773 bytes More work on editor setup
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public static class IsoMenu
{

    private static IsoEditor isoEditor = null;

    [MenuItem("Window/Scene GUI/Enable ISO Cam Button")]
    public static void EnableButtons()
    {
        isoEditor = null;
        IsoEditor[] editors = Resources.FindObjectsOfTypeAll<IsoEditor>();
        if (editors.Length > 0) isoEditor = editors[0];

        if (isoEditor != null)
        {
            isoEditor.EnableButtons();
        }
    }

    [MenuItem("Window/Scene GUI/Disable ISO Cam Button")]
    public static void DisableButtons()
    {
        if (isoEditor != null)
        {
            isoEditor.DisableButtons();
        }
    }
}