public static void CreateSplineTool() { Puppet2D_Editor.SplineCreation = true; SplineCreationGroup = new GameObject(Puppet2D_BoneCreation.GetUniqueBoneName("spline_GRP")); Undo.RegisterCreatedObjectUndo(SplineCreationGroup, "undo create Spline"); splineStoreData = SplineCreationGroup.AddComponent <Puppet2D_FFDStoreData>(); }
public static void FFDSetFirstPath() { FFDControlsGrp = new GameObject(Puppet2D_BoneCreation.GetUniqueBoneName("FFD_Ctrls_GRP")); Undo.RegisterCreatedObjectUndo(FFDControlsGrp, "undo create FFD"); ffdStoreData = FFDControlsGrp.AddComponent <Puppet2D_FFDStoreData>(); if ((Puppet2D_Editor.FFDGameObject != null) && Puppet2D_Editor.FFDGameObject.GetComponent <PolygonCollider2D>()) { Vector2[] firstPath = Puppet2D_Editor.FFDGameObject.GetComponent <PolygonCollider2D>().GetPath(0); foreach (Vector2 pos in firstPath) { FFDCreationMode(pos); } CloseFFDPath(); } }
public static void FFDSetFirstPath() { FFDControlsGrp = new GameObject(Puppet2D_BoneCreation.GetUniqueBoneName("FFD_Ctrls_GRP")); Undo.RegisterCreatedObjectUndo(FFDControlsGrp, "undo create FFD"); ffdStoreData = FFDControlsGrp.AddComponent <Puppet2D_FFDStoreData>(); if ((Puppet2D_Editor.FFDGameObject != null) && Puppet2D_Editor.FFDGameObject.GetComponent<PolygonCollider2D>()) { Vector2[] firstPath = Puppet2D_Editor.FFDGameObject.GetComponent<PolygonCollider2D>().GetPath(0); foreach (Vector2 pos in firstPath) { FFDCreationMode(pos); } CloseFFDPath(); } }