private void LoadBrush() { if (_BrushProjector == null) { Texture2D brushTexture = EditorGUIUtility.Load("Brushes/builtin_brush_1.png") as Texture2D; _Brush = new TextureBrush(brushTexture, 64); _BrushProjector = new BrushProjector(); _BrushProjector.Brush = _Brush; } }
private void DestroyBrushes() { if (_Brush != null) { _Brush.Destroy(); _Brush = null; } if (this._BrushProjector != null) { this._BrushProjector.Destroy(); this._BrushProjector = null; } }