Unity/게임 개발 스터디

게임 개발 스터디 7 : UI Builder에서 ObjectField 외에도 Library Controls 추가하는 방법

sorry0101 2022. 9. 15. 16:21

UI Builder 에서는 ObjectField를 만드는 것은 아직 추가가 안된줄 알았는데 Unity Forum에서 방법을 찾았다!!

https://forum.unity.com/threads/what-is-the-updated-way-to-add-an-object-field-now.957878/

 

Question - What is the updated way to add an object field now?

It's been a while since the last time I worked with UIElements and now I can't add an object field like I used to. Any help is appreciated.

forum.unity.com

wow..

 

1. UI Toolkit에서 Library Controls 추가하는 방법

Viewport 에서 uxml 창을 더블클릭한 후 Inspector - Document Settings - Editor Extension Authoring 을 활성화해주면 된다.

바로 적용되지 않으니 창을 다시 열어주면 된다.

 

결과!

Editor Only 라는 표시가 뜨면서 놀랍도록 다양한 Control이 생성되었다!!