public void AddLayer(int addPos) { ArrayTools.Insert(ref array, addPos, new GrassType() { name = "Grass Block" }); if (mainTexArray != null) { TextureArrayTools.Insert(ref mainTexArray, addPos, null); } if (bumpMapArray != null) { TextureArrayTools.Insert(ref bumpMapArray, addPos, null); } if (specSmoothMapArray != null) { TextureArrayTools.Insert(ref specSmoothMapArray, addPos, null); } if (sssVanishMapArray != null) { TextureArrayTools.Insert(ref sssVanishMapArray, addPos, null); } if (changeBlockData) { Voxeland.current.data.InsertType((byte)addPos); } }
public void AddLayer(int addPos) { ArrayTools.Insert(ref array, addPos, new ObjectType() { name = "Objects Block" }); }
public void BackTrack() { transform.position = track[track.Length - 1]; ArrayTools.Insert(ref track, 0, track[0]); ArrayTools.Insert(ref timeTrack, 0, timeTrack[0]); ArrayTools.RemoveAt(ref track, track.Length - 1); ArrayTools.RemoveAt(ref timeTrack, timeTrack.Length - 1); }
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 AddLayer(int addPos) { ArrayTools.Insert(ref array, addPos, new BlockType() { name = "Land Block" }); if (changeBlockData) { Voxeland.current.data.InsertType((byte)addPos); } //saving texture array guids #if UNITY_EDITOR if (textureArrays) //based on TextureArrayInspector { mainTexArrDec.Insert(null, null, addPos); bumpTexArrDec.Insert(null, null, addPos); UnityEditor.AssetDatabase.Refresh(); } #endif }
public void AddLayer(int num) { ArrayTools.Insert(ref gens, num, new GrassGenerator()); }