3개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Hi fluffy. You can use some code like this.
AZ::Entity* newEntity = aznew AZ::Entity("testEntity");
newEntity->CreateComponent("{22B10178-39B6-4C12-BB37-77DB45FDD3B6}"); // transform component
newEntity->CreateComponent("{.....}"); // your component uuid
newEntity->Init();
newEntity->Activate();
AZ::Vector3 pos(0.0f, 0.0f, 0.0f); // position
AZ::TransformBus::Event(newEntity->GetEntityId(), &AZ::TransformInterface::SetWorldTM, AZ::Transform::CreateTranslation(pos));
Hope, that help to you :)
답변함 6년 전
0
Thanks for tip ! Can we just use name of components instead of those uuid numbers ?
답변함 6년 전
0
No only uuid of component. Name using just for debugging and not using in create process, how far i know.
답변함 6년 전
이 게시물은 마감됨: 새 답변, 댓글 및 투표 추가가 비활성화되었습니다.
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전