EditorTool API를 사용하여 에디터 툴을 생성할 수 있습니다.
에디터 툴의 컨텍스트에 따라 해당 툴이 에디터에서 어떤 영향을 미치는지가 결정됩니다.툴은 전역 툴이거나 컴포넌트 툴입니다.
EditorToolContext API
는 에디터의 빌트인 변환 툴이 영향을 주는 것을 변경합니다.
기본 툴 컨텍스트는 게임 오브젝트입니다.게임 오브젝트 툴 컨텍스트가 있는 툴은 게임 오브젝트의 Transform 값에 영향을 줍니다.기타 컨텍스트는 다른 요소에 영향을 줄 수 있습니다.예를 들어 스플라인 툴 컨텍스트는 이동, 회전, 스케일 툴이 스플라인 매듭과 탄젠트에 영향을 주도록 합니다.
프로젝트에 여러 툴 컨텍스트가 포함된 경우 툴 오버레이의 첫 번째 버튼을 사용하여 툴 컨텍스트를 선택할 수 있습니다.툴 컨텍스트 버튼을 선택하지 않은 경우 기본 게임 오브젝트 툴 컨텍스트가 활성화됩니다.프로젝트에 추가 툴 컨텍스트가 없는 경우 툴 오버레이에서 툴 컨텍스트 버튼을 사용할 수 없습니다.
EditorTool API로 생성하는 툴은 전역 툴 또는 컴포넌트 툴입니다.
전역 툴은 모든 게임 오브젝트에 영향을 줍니다.
전역 툴은 선택하는 게임 오브젝트 타입에 관계없이 항상 사용할 수 있습니다.예를 들어 변환 툴은 모든 게임 오브젝트에서 작동하므로 항상 변환 툴에 액세스할 수 있습니다.
툴 오버레이는 이동, 회전, 스케일, 사각과 같은 빌트인 변환 툴 뒤에 있는 섹션에 전역 툴을 표시합니다.
컴포넌트 툴은 특정 컴포넌트에 영향을 줍니다.
컴포넌트 툴은 툴의 출처가 되는 컴포넌트가 연결된 게임 오브젝트를 선택할 때만 사용할 수 있습니다.예를 들어 Light 컴포넌트가 있는 게임 오브젝트를 선택한 경우에만 광원에 대한 커스텀 매니퓰레이터 툴을 사용할 수 있습니다.
툴 오버레이의 마지막 버튼은 컴포넌트 툴입니다.컴포넌트 툴은 해당 컴포넌트에 따라 그룹으로 나누어 집니다.컴포넌트 툴의 유효성은 씬(Scene) 뷰 또는 계층(Hierarchy) 창에서 활성으로 선택한 항목에 따라 달라집니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.