private void OnEnable() { if (target is MovableTriangle) { _triangle = (MovableTriangle)target; } }
private static void CreateShapeTriangle() { MovableTriangle zone = CreateGenericShape <MovableTriangle>("SHAPE: Triangle"); Triangle spline = TriangleEditor.CreateLineOnGameObject(zone.gameObject); UnityEditor.Editor splineEditorGeneric = UnityEditor.Editor.CreateEditor(zone, typeof(MovableTriangleEditor)); MovableTriangleEditor zoneEditor = (MovableTriangleEditor)splineEditorGeneric; zoneEditor.ConstructSplineZone(spline); }