Unity – Inspector 的陣列操作


想要用的時候又忘記怎用,還是先筆記一下!這是來自同事分享的一篇文章『Unity Editor Lesser Known Features

4) Inserting and Deleting Items From Arrays In Inspector – Populating arrays using the Unity editor is very handy, that is until you realize that you need to remove or add an item in the middle of the array. It might appear that there is no way to do this, but there is. To duplicate an item, select it and hit Ctrl-D (Windows), Command-D (Mac). To delete an item, hit Shift-Delete twice (once to clear, second time to remove it)


Ctrl-D : 在該物件下面"插入"一個複製的項目

Shift-Delete : 如果該物件不為 null 則清除(等同一般 delete);若該物件為 null,則"刪除"該物件。



WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google photo

您的留言將使用 Google 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.