• [Unreal 게시판] unreal editor에서 배치한 actor를 script에서 정확하게 찾는 방법2013.09.30 PM 09:02

게시물 주소 FONT글자 작게하기 글자 키우기

Question>

unreal editor로 InterpActor 1개를 map에 배치시켜 놓고,
그걸 foreach를 이용해서 class'InterpActor'로 찾으려니까 안나옴.
map에 있는 특정 actor를 s!crip에서 딱 그 1개만 집어 내서 처리하려면,
어떻게 해야 하는가?

-------------------------------------------------------------

Answer>

map에 배치된 actor 1개를 빠르고 정확하게 찾는 가장 좋은 방법은
님이 정의한 placeable class로 actor를 정의하는 겁니다.^^

예를 들어 아래와 같이 'NewInterpActor' class를 정의합니다.

class NewInterpActor extends InterpActor placeable;

var() int UniqueId;

defaultproperties
{
UniqueId = 0
}

그리고 나서, build 이후, unreal editor를 띄우면,
content browser의 class에 'NewInterpActor'를 찾으실 수 있습니다.
이걸 map에 배치합니다.

이제, s!crip에서 foreach()로 'NewInterpActor'를 검색하면,
금방 찾을 수 있습니다.^^

좀 더 정확하게 찾고 싶다면,
unreal editor의 property 창에서 UniqueId에 고유값 번호를 넣어서,
foreach()안에서 비교해서 찾으시면, 정확하게 찾으실 수 있겠습니다.^^







Tag:
안기훈, Kee Hoon Ahn, Unreal, UDK, iPhone, iPad, app, 앱, iOS
댓글 : 0 개
친구글 비밀글 댓글 쓰기