Generation

generate functionFri, 09 Dec 2022

Play a random animation from the folder "animation"

//global variable to store all the files string[] files = Directory.GetFiles(Application.streamingAssetsPath + "/animation/"); string getRandomAnimation() { int random = Random.Range(0, files.Length); return files[random]; }

Questions about programming?Chat with your personal AI assistant