mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
EditorContentManager Part 1
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -16,16 +16,16 @@ namespace GlitchyEditor.EditWindows
|
||||
const String ContentDirectory = "./content";
|
||||
|
||||
//private String _currentDirectory ~ delete _;
|
||||
private TreeNode<EditorContentManager.AssetNode> _currentDirectoryNode;
|
||||
private TreeNode<AssetNode> _currentDirectoryNode;
|
||||
|
||||
public static SubTexture2D s_FolderTexture;
|
||||
public static SubTexture2D s_FileTexture;
|
||||
|
||||
public EditorContentManager _manager ~ delete _;
|
||||
public EditorContentManager _manager;
|
||||
|
||||
public this()
|
||||
public this(EditorContentManager contentManager)
|
||||
{
|
||||
_manager = new EditorContentManager();
|
||||
_manager = contentManager;
|
||||
}
|
||||
|
||||
protected override void InternalShow()
|
||||
|
||||
Reference in New Issue
Block a user