Attributes 는 스크립트에서 클래스, 프로퍼티 또는 함수 위에 명시하여 특별한 동작을 나타낼 수 있는 마커입니다. 예를 들어, 프로퍼티 선언 위에 HideInInspector
속성을 추가하여 인스펙터가 공용 프로퍼티인 경우에도 프로퍼티를 표시하지 않도록 할 수 있습니다. C#의 경우 다음과 같이 속성 이름을 대괄호 안에 포함합니다.
[HideInInspector]
public float strength;
Unity는 API 레퍼런스 문서에 나와 있는 다양한 속성을 제공합니다.
.NET 라이브러리에도 속성이 정의되어 있습니다. 이러한 속성은 Unity 코드에 도움이 될 때가 많습니다. 자세한 내용은 속성에 관한 Microsoft 문서를 참조하십시오.
참고: .NET 라이브러리에 정의된 ThreadStatic 속성은 사용하지 마십시오. 이 속성을 Unity 스크립트에 추가하면 크래시가 발생합니다.
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.