1.
[MenuItem("Tools/获取场景物体")] public static void GetGameOjbect() { GameObject go = UnityEditor.Selection.gameObjects[0]; Debug.Log(go.name); }
1.
[MenuItem("Tools/获取场景物体")] public static void GetGameOjbect() { GameObject go = UnityEditor.Selection.gameObjects[0]; Debug.Log(go.name); }