Serialize Mesh and MeshRenderer in scene + fixed Light serialization

This commit is contained in:
Simon Lübeß
2023-01-08 19:31:01 +01:00
parent b5ca86d8de
commit e38373dccf
8 changed files with 204 additions and 42 deletions
@@ -268,10 +268,10 @@ namespace GlitchyEditor.EditWindows
StringView path = .((char8*)payload.Data, (int)payload.DataSize);
Texture2D texture = Content.LoadAsset<Texture2D>(path);//new Texture2D(path, true);
spriteRendererComponent.Sprite?.ReleaseRef();
spriteRendererComponent.Sprite = texture;
using (Texture2D texture = Content.LoadAsset<Texture2D>(path))
{
spriteRendererComponent.Sprite = texture;
}
}
ImGui.EndDragDropTarget();