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]; }

Want to kickstart your project?Use the new AI Studio to create your code