Added option to create Materials in Asset Browser

This commit is contained in:
Simon Lübeß
2023-08-01 16:24:31 +02:00
parent e8a5594540
commit 253dd8087e
5 changed files with 133 additions and 137 deletions
+8
View File
@@ -151,6 +151,14 @@ namespace GlitchyEditor
SaveScene(newScene, path);
}
}));
Editor.Instance.ContentBrowserWindow.RegisterAssetCreator(new AssetCreator("Material", "New Material.mat", new (path) =>
{
using (Material newMaterial = new Material())
{
_contentManager.SaveAssetToFile(newMaterial, path);
}
}));
}
private void InitGraphics()