Exemplo n.º 1
0
 public override void Restart(float delaySec)
 {
     EditorApplication.isPlaying = false;
     //TODO:延时实现
     //EditorApplication.isPlaying = true;
     //EditorTools.StartCoroutine()
     EdiorCoroutine.Delay(delaySec, () => { EditorApplication.isPlaying = true; });
 }
Exemplo n.º 2
0
 /// <summary>
 /// 重命名当前Hierarchy选中的GameObject
 /// </summary>
 public static void RenameCurHierachyObj()
 {
     EdiorCoroutine.Delay(1f, () =>
     {
         var type = typeof(EditorWindow).Assembly.GetType((GetViewTypeStr(EditorViews.SceneHierarchyWindow)));
         var hw   = GetWindow(type);
         if (hw)
         {
             var rename = type.GetMethod("RenameGO", BindingFlags.Instance | BindingFlags.NonPublic);
             rename.Invoke(hw, null);
         }
     });
 }