3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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 :)
répondu il y a 6 ans
0
Thanks for tip ! Can we just use name of components instead of those uuid numbers ?
répondu il y a 6 ans
0
No only uuid of component. Name using just for debugging and not using in create process, how far i know.
répondu il y a 6 ans
Cette publication est fermée : l'ajout de nouvelles réponses, commentaires et votes est désactivé.
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans