/// <summary>Creates a new UI Batch which will be rendered with the given renderer.</summary> /// <param name="renderer">The renderer that will render this batch.</param> public UIBatch(Renderman renderer){ Mesh=new DynamicMesh(this); ChangeRenderer(renderer); }
/// <summary>Permanently destroys this UI batch.</summary> public void Destroy() { if (Renderer == null) { return; } if (IsolatedProperty != null) { IsolatedProperty.Isolated = false; IsolatedProperty.OnBatchDestroy(); IsolatedProperty = null; } if (Mesh != null) { Mesh.Destroy(); Mesh = null; } Renderer = null; }
/// <summary>Creates a new UI Batch which will be rendered with the given renderer.</summary> /// <param name="renderer">The renderer that will render this batch.</param> public UIBatch(Renderman renderer) { Mesh = new DynamicMesh(this); ChangeRenderer(renderer); }
/// <summary>Creates a new block that belongs to a given mesh.</summary> /// <param name="parentMesh">The mesh the block will belong to.</param> public MeshBlock(DynamicMesh parentMesh){ ParentMesh=parentMesh; Colour=Color.white; }
/// <summary>Sets an index in a batch. Used in paint mode.</summary> public void SetBatchIndex(UIBatch batch, int blockIndex) { Buffer = null; Mesh = batch.Mesh; BlockIndex = blockIndex; }
/// <summary>Permanently destroys this UI batch.</summary> public void Destroy(){ if(Renderer==null){ return; } if(IsolatedProperty!=null){ IsolatedProperty.Isolated=false; IsolatedProperty.OnBatchDestroy(); IsolatedProperty=null; } if(Mesh!=null){ Mesh.Destroy(); Mesh=null; } Renderer=null; }
/// <summary>Creates a new block that belongs to a given mesh.</summary> /// <param name="parentMesh">The mesh the block will belong to.</param> public MeshBlock(DynamicMesh parentMesh) { ParentMesh = parentMesh; Colour = Color.white; }