TheCherno / Hazel

Hazel Engine
Apache License 2.0
11.64k stars 1.5k forks source link

OnCreate() need invoke after all the ScriptEntities added into "s_Data->EntityInstances" #606

Open WhereIsMyID opened 1 year ago

WhereIsMyID commented 1 year ago

When i want get an entity by "FindEntityByName()" in "OnCreate()" function, there will be a promblem that it would miss the instance from the function: "void ScriptEngine::OnCreateEntity(Entity entity)", because the "InvokeOnCreate()" will excute during every loop, so i think the invoke function need another way to do.