- Home /
Updating variables from dictionary database in edit mode C#
I'm making an RPG and have a dictionary which is populating itself from an external XML file to create an item database. What I want to do is be able to drag a generic item prefab into the world via the editor, type in a key via the inspector for that item, and have it automatically update all of it's information (i.e name, value, weight) by extracting the information from the item database. I want this all to happen in edit mode. The database class is static and I have a separate mono behavior class populating it in edit mode. That's working fine. The problem is that I can't attach a script containing [ExecuteInEditMode] to the item prefab, which I would presumably need in order to have it update it's information in edit mode. What would be the best way to go about doing this? I would optimally like it to update whenever I change the item key variable and not any more often than that.
I'm sorry if I explain things in a confusing and roundabout way. Hopefully that made sense.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to pass SQL vars? 1 Answer
Why is get_url adding an extra 'http://'? -- DB request fail 1 Answer