public void RemoveAt(int index) { #if UNITY_EDITOR ArrayTools.RemoveAt(ref srcArr, index); TextureArrayTools.RemoveAt(ref texArr, index); SaveSources(); #endif }
public void Switch(int ch1, int ch2) { #if UNITY_EDITOR ArrayTools.Switch(srcArr, ch1, ch2); TextureArrayTools.Switch(ref texArr, ch1, ch2); SaveSources(); #endif }
public void Insert(Texture2D tex, Texture2D al, int index) { #if UNITY_EDITOR ArrayTools.Insert(ref srcArr, index, new SrcLayer()); TextureArrayTools.Insert(ref texArr, index, new Texture2D(texArr.width, texArr.height)); if (tex != null) { SetSource(tex, index, isAlpha: false, saveSources: false); } if (al != null) { SetSource(al, index, isAlpha: true, saveSources: false); } SaveSources(); #endif }
public void Add(Texture2D tex, Texture2D al) { #if UNITY_EDITOR ArrayTools.Add(ref srcArr, new SrcLayer()); TextureArrayTools.Add(ref texArr, new Texture2D(texArr.width, texArr.height)); if (tex != null) { SetSource(tex, srcArr.Length - 1, isAlpha: false, saveSources: false); } if (al != null) { SetSource(al, srcArr.Length - 1, isAlpha: true, saveSources: false); } SaveSources(); #endif }