mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Allow dragging and dropping of Entities in editor
+ New Dictionary Helpers + Made ImGui Payloads safer + Start of Component drag'n'drop
This commit is contained in:
@@ -100,6 +100,15 @@ namespace GlitchyEngine.World
|
||||
ScriptEngine.InitializeInstance(targetEntity, targetComponent);
|
||||
}
|
||||
|
||||
// Copy values to entities.
|
||||
// We do this in a separate loop because we might reference other entities.
|
||||
// If we did it in a single loop these entities might not exist yet.
|
||||
for (let (handle, script) in target._ecsWorld.Enumerate<ScriptComponent>())
|
||||
{
|
||||
Entity entity = .(handle, this);
|
||||
ScriptEngine.CopyEditorFieldsToInstance(entity, script);
|
||||
}
|
||||
|
||||
// Copy transforms... needs special handling for the Parent<->Child relations
|
||||
for (let (sourceHandle, sourceTransform) in _ecsWorld.Enumerate<TransformComponent>())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user