Best way to implement an item database?
The problem: I need to create many different types of items with different functionalities. They implement the same interface, but I don't want to create separate scripts for each one.
Thoughts: Each item has an if that points to a script database containing all item functionality. But since I can't create anonymous Coroutines, I would have to create unique coroutines for each item, worse than creating separate scripts for each item. Any ideas?
Posted Apr 15, 2017, 9:20 PM UTC
I don't know if I really understand your problem, but have you ever looked at Scriptable Objects? Maybe is what you are searching for!
Hmm I'll look into them. Thanks for the input!
Np dude, if you see that fits your needs, i tell you from my (noob) experience that they Save your life! They are kind of tedious to handle the first time you try to use them in your code, but when you get used to them, you will always want to use them for your projects!