Hi everyone !
I’m facing a strange and annoying issue while working with keyframe. It’s pretty simple : I just CANT change any keyframe (value / time), even if the AnimationCurve is created by code or in the inspector.
using UnityEngine;
using System.Collections;
public class KeyframeTest : MonoBehaviour {
public AnimationCurve testCurve ;
// Use this for initialization
void Start ()
{
testCurve = new AnimationCurve() ;
testCurve.AddKey(0f,1f) ;
testCurve.AddKey(0.5f,0f) ;
testCurve.AddKey(1f,1f) ;
Debug.Log(testCurve.keys[1].value+" "+testCurve.keys[1].time) ;
testCurve.keys[1].value = 10f ;
testCurve.keys[1].time = 0.7f ;
Debug.Log(testCurve.keys[1].value+" "+testCurve.keys[1].time) ;
}
}
I’m using Unity 4.3.3f1, if someone can check this with a different version it will be awesome
!