MCQs > IT & Programming > Unity3D > Correct program for Loop animation of A, B and C (A-B-C-A)?

Unity3D MCQs

What is the correct program for Loop animation of A, B and C (A-B-C-A)?


Answer

Correct Answer:

public List stateName; 

    void Start () {StartCoroutine (StartAnim());}

    IEnumerator StartAnim(){

        for(int i=0;i

            GetComponent ().Play (stateName[i]);

            yield return new WaitForSeconds(GetComponent ().GetCurrentAnimatorStateInfo (0).length);

            if(i==stateName.Count-1){i =-1;}

        }

    }

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Unity3D Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Unity3D Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it