- Home /
Better way to reference Scriptable objects than using string?
So I'm building up a list of Trading cards using scriptable objects. I want to give a player a default deck which currently gets the card data scriptable objects by using an array of strings, which are the names of the scriptable objects in the resource folder. My question is: Is there a way to use something other than these location strings (This way seems fragile to me, since changing the file name will break all references to the object)? Or is there maybe a better way to approach this altogether that doesn't involve prepopulating all the scriptable card objects into some manager? Or is the manager approach actually desirable?
I'm simply trying to make the card system scalable and manageable in the long term
Answer by JonPQ · Jul 31, 2021 at 12:21 AM
you could have 1 scriptable object containing data about all the others