Randomly display an asset from Selection of assets
I need to create a script that can randomly select an object from my list of assets and display it on the left of the screen, and also display that same object on the right of the screen rotated 90 degrees. I think that this would be best accomplished by creating blank objects and manually optimizing their positions in front of the camera, and creating a script to randomly call the assets to the blank objects. I need direction with how to write the scripts. How would I go about writing a script or scripts that would randomly select an asset and display it in both the left and right of the screen?
I assume by 'assets' you mean sprites/models?
In 2D sprites, you should be able to access the SpriteRenderer of a GameObject and set its Sprite value to something. Not sure how you would read in the list of the assets, but I'm sure there is a way.
I have not looked at 3D, but the concept is likely similar for whatever component renders the model.
Your answer
Follow this Question
Related Questions
Random colors? 0 Answers
Random colors? 0 Answers
Random bitmap generator 0 Answers
Random Scenes Without Repetition 1 Answer
Multinomial Distribution in Unity? 2 Answers