Spawn Entity in Editor

#1
Hi,
Coding in C++ I was looking for spawning an entity that could be then manipulated in editor (position, scale, rotation etc...).
It does not seem to be possible, which is very regrettable but may be I did not find the solution. Has any one tried/succeed to spawn
an entity with C++ code and then make it handle in the sandbox?

Thank you.

Re: Spawn Entity in Editor

#5
i doubt that

search

void MarkEntityForSerialize(TSerializationData& data, IEntity* pEntity, int reason, bool markParent = true)

it is about level Serialization

search
GetEntity()->GetFlags() & ~ENTITY_FLAG_NO_SAVE for markng entity to save to level

http://docs.aws.amazon.com/lumberyard/l ... ation.html

http://www.crytek.co.kr/confluence/disp ... ool+System


search ENTITY_EVENT_XFORM_FINISHED_EDITOR

ENTITY_EVENT_RESET

ENTITY_EVENT_PRE_SERIALIZE

ENTITY_EVENT_POST_SERIALIZE

ENTITY_EVENT_EDITOR_PROPERTY_CHANGED

to find where event send . they are related to editor

Re: Spawn Entity in Editor

#6
Well actually I am spawning my entities with flags = 0 so ENTITY_FLAG_NO_SAVE is not set. The events sent from editor can be caught but my entity is not editable from the sandbox. I think that you are referring to some CryEngine 3.x functions because there is not EntityPoolManager in CryEngine V.

Re: Spawn Entity in Editor

#7
create entity like LightEntity.h test function call

hard way . add gizmo proxy, register mouse hover or click drag event. then move entity to gizmo position.

the core is event driving

virtual uint64 GetEventMask() const override { return BIT64(ENTITY_EVENT_START_LEVEL) | BIT64(ENTITY_EVENT_RESET) | BIT64(ENTITY_EVENT_EDITOR_PROPERTY_CHANGED) | BIT64(ENTITY_EVENT_XFORM_FINISHED_EDITOR); }

i did not find where send ENTITY_EVENT_XFORM_FINISHED_EDITOR event in source code . may be from lua or other dll ?

Who is online

Users browsing this forum: No registered users and 1 guest