추가되는 모든 브러시 에디터는 GridBrushEditorBase
로부터 값을 상속받습니다. GridBrushEditorBase
는 팔레트 창에서 인스펙터를 그리거나 씬 뷰에서 기즈모를 그릴 때 사용하는 고정된 API 세트를 제공합니다.
public virtual GameObject[] validTargets
이 구문은 브러시로 색칠할 대상이 되는 게임 오브젝트의 목록를 반환합니다. 게임 오브젝트의 목록은 팔레트 창의 드롭다운에 표시됩니다. 이 구문을 오버라이드하여 브러시로 상호작용할 수 있는 타겟 목록을 만들 수 있습니다.
public virtual void OnPaintInspectorGUI()
이 구문은 브러시 옵션을 편집할 수 있는 인스펙터를 팔레트에 표시합니다. 씬 뷰에서 편집하는 중에 브러시 기능을 업데이트할 때 이 구문을 사용할 수 있습니다.
public virtual void OnSelectionInspectorGUI()
이 구문은 타겟 그리드에서 셀이 선택되었을 때 사용되는 인스펙터를 표시합니다. 이 구문을 오버라이드하여 선택된 셀에 대한 커스텀 인스펙터 뷰를 표시할 수 있습니다.
public virtual void OnPaintSceneGUI(GridLayout grid, GameObject brushTarget, BoundsInt position, GridBrushBase.Tool tool, bool executing)
이 구문은 브러시로 색칠하면서 씬 뷰에 추가 기즈모를 그릴 때 사용됩니다. 팔레트에서 현재 선택된 도구를 기준으로 합니다. 실행하면 브러시가 특정 시간에 사용되고 있는지 여부가 반환됩니다.
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.