Unity 啟用或關閉選中物體快捷鍵

2021-07-11 12:11:52 字數 542 閱讀 8840

首先在assets 目錄下,建立資料夾editor,接著建立乙個指令碼wshgameobjectactive.cs

using unityengine;

//引入unity編輯器命名空間

using unityeditor;

using system.collections;

public class wshgameobjectactive : scriptableobject

[menuitem(keyname)]

static void seletenable() }

//獲得選中的物體

static gameobject getselectedgameobjects()

//啟用或關閉當前選中物體

public static void enablegameobject(gameobject parent, bool enable)

}

當選中物體時,就可以通過快捷鍵「ctrl + shift + h」啟用或者關閉該物體。

啟用與禁用遊戲物體 unity

unity啟用與禁用遊戲物體gameobject.activeinhierarchy 返回當前物體是否啟用gameobject.setactive true 將物體啟用gameobject.setactive false 將物體禁用 由於物體被禁用之後,就無法執行,所以先要用gameobject.f...

centos防火牆啟用 關閉 禁用或開啟埠

出處 url 防火牆的基本操作命令 查詢防火牆狀態 service iptables status 停止防火牆 service iptables stop 啟動防火牆 service iptables start 重啟防火牆 service iptables restart 永久關閉防火牆 chkc...

選中一行或多行的快捷鍵

一.全選 ctrl a 二.選擇當前行 按home 定位到行首 然後按shift dnd 行尾 或者 按end 定位到行尾 然後按shift home 或者 按home 定位到行首 然後按shift 三.選中多行 按home 定位到行首 然後按ctrl shift dnd 行尾 或者 按end 定位...