Created
November 18, 2019 07:36
-
-
Save inertiave/a6e5d2048e2ec296e1297fa0a44de169 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| namespace UnityEngine { | |
| [CreateAssetMenu(menuName = "Animation Curve", order = 400)] | |
| public class AnimationCurveAsset : ScriptableObject { | |
| public AnimationCurve curve = AnimationCurve.Linear(0, 0, 1, 1); | |
| public static implicit operator AnimationCurve(AnimationCurveAsset me) | |
| { | |
| return me.curve; | |
| } | |
| public static implicit operator AnimationCurveAsset(AnimationCurve curve) | |
| { | |
| AnimationCurveAsset asset = CreateInstance<AnimationCurveAsset>(); | |
| asset.curve = curve; | |
| return asset; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment