EditorContentManager Part 1

This commit is contained in:
Simon Lübeß
2023-01-01 16:53:45 +01:00
parent dffd43a36f
commit c389a77274
29 changed files with 3774 additions and 81 deletions
@@ -268,7 +268,7 @@ namespace GlitchyEditor.EditWindows
StringView path = .((char8*)payload.Data, (int)payload.DataSize);
Texture2D texture = new Texture2D(path, true);
Texture2D texture = Content.LoadAsset<Texture2D>(path);//new Texture2D(path, true);
spriteRendererComponent.Sprite?.ReleaseRef();
spriteRendererComponent.Sprite = texture;
@@ -319,7 +319,7 @@ namespace GlitchyEditor.EditWindows
StringView path = .((char8*)payload.Data, (int)payload.DataSize);
using (Texture2D newTexture = new Texture2D(path, true))
using (Texture2D newTexture = Content.LoadAsset<Texture2D>(path))//new Texture2D(path, true))
{
newTexture.SamplerState = SamplerStateManager.AnisotropicWrap;
material.SetTexture(texture.key, newTexture);