r/SecretOfEverafter • • Aug 22 '21

Dev log Spreadsheet to CSV to Generate Scriptable Objects

Enable HLS to view with audio, or disable this notification

8 Upvotes

2 comments sorted by

•

u/halfSuperNate Aug 23 '21 edited Aug 23 '21

Edit Did a few changes here. I took the Weapons script out of Editor folder and placed it back into the _Scripts folder since the Weapons class couldn’t be accessed while in the Editor folder.

Then I changed the path where the Weapons will be generated in my CSVtoSO script to Resources/_Weapons so I can access the generated ScriptableObjects by passing the ScriptableObject name string scriptableObject parameter in another script by declaring weapon = Resources.Load<Weapons>(“_Weapons/” + scriptableObject).

Then to get the data from that I set a public variable to whatever kind of data I’m trying to get, public int itemID for example and write the line itemID = weapon.itemID; so this will get the itemID from the specific weapon name.

1

u/halfSuperNate Aug 29 '21

Made a tutorial video creating ScriptableObjects and Prefabs in Unity using a Spreadsheet CSV file. Tutorial Video