using UnityEditor; using UnityEngine; public static class EditorInit { /* [MenuItem("EditorExtensions/ProjectInit")] static void Init() { // SetBtn 设置父子关系 Transform CenterCamera = GameObject.Find("SDKSystem/NRCameraRig/CenterCamera").gameObject.transform; Transform SetBtn = GameObject.Find("SetBtn").gameObject.transform; SetBtn.SetParent(CenterCamera); Debug.LogError("SetBtn 设置父子关系"); // MoveScenePanel 设置父子关系 GameObject MoveScenePanel = GameObject.Find("EditorCanvas/MoveScenePanel"); MoveScenePanel.SetActive(false); Transform AnchorBtn = SetBtn.Find("AnchorBtn"); MoveScenePanel.transform.SetParent(AnchorBtn); Debug.LogError("MoveScenePanel 设置父子关系"); } */ }