private void OnEnable()
 {
     if (target is MovableTriangle)
     {
         _triangle = (MovableTriangle)target;
     }
 }
示例#2
0
        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);
        }