I'm trying to make an extremely flexible and customizeable menu system for my RPG game. Initially I started with a set of runtime generated UI elements or widgets that I'm now trying to turn into prefabs.
My issue is thus. With said widgets I used C#'s built-in action to assign a void function to each widget. I'm not seeing any method of doing that in an editable and dynamic fashion in unity which means I have a prefab that has to be initialized and assigned the corresponding function after being instantiated.
My question boils down to is there a more dynamic way of instantiating these prefabs in unity without having to manually assign each function in a script?
↧