Picking from a list of user created assets
Hi all,
Apologies if the title is not appropriately descriptive.
In short: Following some online tutorials I have successfully created a scriptableobject which holds data relevant to the properties of a playing card. The GameObject that visually represents the card has the script attached which then shows the relevant fields that can be updated from my assets I have created. Screenshot attached hopefully demonstrates this:
![alt text][1] [1]: /storage/temp/115658-inspector.jpg
Now, what I would like to do is on the scene starting, the card component ( Where I currently have the TestCard script dragged into) randomly picks from the card scripts I have pregenerated.
There is a lot of advice out there, but I am struggling on finding an appropiate starting point. In my mind and from advice I have seen this should be achievable but I am struggling on finding a starting point.
Grateful for a steer on where to start and apologies for any misuse of terms - I am still very new to Unity and coding in general.
Thank you in advance
Your answer
![](https://koobas.hobune.stream/wayback/20220612161434im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to save class data(variables) into an asset file in editor ? 1 Answer
ScriptableObjects inside another ScriptableObject not saving changes in Custom Editor Window 0 Answers
Prefab loses reference to a scriptable object 0 Answers
How can I get a sub asset? 1 Answer
How do you assign the value of a ScriptableObject (from asset) to a component variable? 0 Answers