A game about forced loneliness, made by TACStudios
at master 60 lines 1.4 kB view raw
1using UnityEngine; 2 3namespace UnityEditor.U2D.Animation 4{ 5 internal class WeightPainterToolWrapper : BaseTool 6 { 7 [SerializeField] 8 private WeightPainterMode m_PaintMode; 9 10 [SerializeField] 11 private WeightPainterTool m_WeightPainterTool; 12 13 private string m_Title; 14 15 public override IMeshPreviewBehaviour previewBehaviour 16 { 17 get { return m_WeightPainterTool.previewBehaviour; } 18 } 19 20 public WeightPainterTool weightPainterTool 21 { 22 get { return m_WeightPainterTool; } 23 set { m_WeightPainterTool = value; } 24 } 25 26 public WeightPainterMode paintMode 27 { 28 get { return m_PaintMode; } 29 set { m_PaintMode = value; } 30 } 31 32 public string title 33 { 34 set { m_Title = value; } 35 } 36 37 public override int defaultControlID 38 { 39 get { return weightPainterTool.defaultControlID; } 40 } 41 42 protected override void OnActivate() 43 { 44 weightPainterTool.Activate(); 45 weightPainterTool.panelTitle = m_Title; 46 } 47 48 protected override void OnDeactivate() 49 { 50 weightPainterTool.Deactivate(); 51 } 52 53 protected override void OnGUI() 54 { 55 weightPainterTool.paintMode = paintMode; 56 57 weightPainterTool.DoGUI(); 58 } 59 } 60}