diff --git a/Editor/VramEditorWindow.cs b/Editor/VramEditorWindow.cs index 74119bb..20c375e 100644 --- a/Editor/VramEditorWindow.cs +++ b/Editor/VramEditorWindow.cs @@ -44,6 +44,14 @@ public class VRAMEditorWindow : EditorWindow GetWindow("VRAM Editor"); } + private void OnEnable() + { + vramImage = new Texture2D(VramWidth, VramHeight); + NativeArray blackPixels = new NativeArray(VramWidth * VramHeight, Allocator.Temp); + vramImage.SetPixelData(blackPixels, 0); + vramImage.Apply(); + blackPixels.Dispose(); + } public static void PasteTexture(Texture2D baseTexture, Texture2D overlayTexture, int posX, int posY) {