-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use BezierSpline.Rotation(t) to slerp between rotations of node trans…
…forms independent of spline tangent. Add Node button on spline editor. Namespace refactor.
- Loading branch information
Luke Thompson
committed
Sep 6, 2017
1 parent
e168f1e
commit ec972ea
Showing
9 changed files
with
109 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using UnityEngine; | ||
using UnityEditor; | ||
using System.Collections; | ||
using Sigtrap.Bezier; | ||
|
||
namespace Sigtrap.Bezier.Editors { | ||
[CustomEditor(typeof(BezierSpline))] | ||
public class BezierSplineEditor : Editor { | ||
public override void OnInspectorGUI(){ | ||
base.OnInspectorGUI(); | ||
EditorGUILayout.Space(); | ||
EditorGUILayout.LabelField("Nodes"); | ||
if (GUILayout.Button("Add Node")){ | ||
GameObject node = new GameObject("Node"); | ||
node.AddComponent<BezierNode>(); | ||
node.transform.SetParent((target as BezierSpline).transform, false); | ||
Undo.RegisterCreatedObjectUndo(node, "Create Bezier Node"); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters