게임 오브젝트 는 컴포넌트 를 포함합니다. 자세한 내용은 게임 오브젝트 문서를 참조하십시오.
아래는 가장 일반적인 컴포넌트 인 트랜스폼(Transform) 컴포넌트 를 이용하여 게임 오브젝트 와 컴포넌트 관계가 어떻게 작동하는지를 보여주는 예제입니다.
새 게임 오브젝트 에 대해 인스펙터(Inspector) 에서 트랜스폼 컴포넌트 를 확인할 수 있습니다.
주목할 점은 새로운 빈 게임 오브젝트 에 이름(“GameObject”), 태그(Tag) (“Untagged”), 레이어(Layer)(“Default”)가 있다는 점입니다. 또한 트랜스폼 컴포넌트 가 포함되어 있습니다.
에디터에서 트랜스폼 컴포넌트 없이 게임 오브젝트 를 생성할 수는 없습니다. 컴포넌트는 게임 월드 및 씬 뷰(Scene View) 에서 게임 오브젝트 의 포지션, 회전, 스케일을 정의합니다.
또한 트랜스폼 컴포넌트 는 ’부모 지정’이라는 컨셉을 가능하게 하며, 이는 게임 오브젝트 를 작업할 때 중요한 부분입니다. 트랜스폼 컴포넌트 와 부모 지정에 대한 자세한 내용은 트랜스폼 컴포넌트 레퍼런스 페이지를 참조하십시오.
트랜스폼 컴포넌트 는 모든 게임 오브젝트 에 중요하므로 각 게임 오브젝트 는 반드시 하나의 트랜스폼 컴포넌트 를 가집니다. 그러나 게임 오브젝트 는 다른 컴포넌트 도 포함할 수 있습니다.
모든 씬에는 기본적으로 메인 카메라 게임 오브젝트 가 있으며, 여러 컴포넌트 가 포함됩니다. 열려 있는 씬 에서 게임 오브젝트를 선택하여 인스펙터 를 보면 확인할 수 있습니다.
메인 카메라 게임 오브젝트 의 인스펙터 를 보면, 추가 컴포넌트 를 포함하고 있는 것을 볼 수 있습니다. 구체적으로 카메라(Camera) 컴포넌트, GUI 레이어(GUI Layer), 플레어 레이어(Flare Layer) 및 오디오 리스너(Audio Listner) 등이 있습니다. 모든 컴포넌트 는 게임 오브젝트 의 기능을 제공합니다.
리지드바디(Rigidbody), 콜라이더(Collider), 파티클 시스템(Particle System) 및 오디오(Audio)는 모두 게임 오브젝트 에 추가할 수 있는 다른 종류의 컴포넌트 입니다.
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.