I’m trying to offset sprite’s animation clip time offset. This is what I did:
void Awake() {
scores = GameObject.FindGameObjectWithTag("GS").GetComponent<GUI_Scores>();
GetComponent<Animation>().animation["obj_coin"].time = Random.Range(0f, animation["obj_coin"].length);
}
This is the error I’m getting when trying to play the game:
Does anybody know a good way to offset a non-legacy animation’s timing?