ict.lixian.single/Assets/Scripts/EditorTool.cs

20 lines
332 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class EditorTool : MonoBehaviour
{
public static bool can_edit;
#if UNITY_EDITOR
[MenuItem("Tools/选用编辑")]
public static void Switch()
{
can_edit = !can_edit;
}
#endif
}