영어 공부/기타

유니티 튜토리얼 한글 번역 - C# Scripts as Behaviour Components in Unity! - Beginner Scripting Tutorial (1/2)

manwon 2019. 9. 27. 22:33
반응형

 

C# Scripts as Behaviour Components in Unity! - Beginner Scripting Tutorial [유니티 런 링크]

[알림] 유니티 튜토리얼 동영상을 한글로 번역하며 공부 중입니다. 가급적 뜻을 쉽게 파악할 수 있도록 의역을 한 곳이 많습니다. 잘못된 해석은 댓글로 알려주세요. 

 

 

Scripts should be considered as behavior components in Unity.
스크립트는 유니티 내에서 어떠한 반응 혹은 작동을 담당하는 컴포넌트라고 생각하세요. 

As with other components in Unity, they can be applied to objects and are seen in the Inspector.
유니티 내의 다른 컴포넌트처럼, 스크립트는 오브젝트에 붙어서 본연의 임무를 수행합니다. 또한 스크립트는 인스펙터 창에서 볼 수 있습니다.

With this particular example, this cube has a rigid body component, which gives it a physics mass.
이 예제에서, 이 큐브는 리지드 바디 컴포넌트를 갖고 있습니다, 그 리지드 바디 컴포넌트는 이 큐브에 물리적인 중량을 갖도록 하죠.

And when you press play, the cube falls to the ground, as it uses gravity.
그래서 당신이 이 플레이 버튼을 누르면 큐브는 바닥으로 떨어집니다. 왜냐면 큐브에는 중력이 작용하기 때문이죠.

We also have added an example script.
예제용 스크립트를 이미 여기에 추가해 놓았죠. 

This behavior script has code in it which changes the color of the cube by effecting the color value of the default material attached to that object.
이 반응 혹은 작동을 담당하는 비해비어 스크립트는 그 안에 코드가 들어있습니다. 코드는 이 큐브의 색깔이 변하도록 만듭니다. 왜냐면 큐브 오브젝트에 부착된 디폴트 메터리얼의 색상값이 변하도록 영향을 끼치기 때문이죠.

When we press the R key on the keyboard, the color gets changed to red.
우리가 키보드 상의 R키를 누르면 색상은 빨강으로 바뀝니다.

When we press G, the color gets changed to green.
우리가 G키를 누르면 색상은 녹색으로 바뀝니다. 

And when we press B, it gets changed to blue.
그리고 B키를 누르면 색상은 파랑으로 바뀌죠. 

By attaching this script to the object, when we refer to game object, we're referring to this particular item.
이러한 스크립트를 오브젝트에 첨부하기 때문에, 우리가 게임 오브젝트를 들여다 볼 때도, 우리는 이 특정 아이템 즉 스크립트를 보게 될 겁니다. 

  

반응형