Hi, I am looking for a way to call a differentiated method in many scripts (it is related to saving variables for the object the scripts are attached to). Effectively I would like to have one script call out the save, and then many different scripts to have different save methods that are executed (as I want to save/load different information for these objects).
I don’t want to have to to declare each game object and each script in the calling script, which is the way I am used to. With standard declaration I would have hundred of scripts to declare, and it would make adding new objects a chore.
In plain English something like:
all scripts containing method mySaveMethod () execute that method.
in a similar fashion I will then want to execute:
all scripts containing method myLoadMethod() execute that method.
In looking through forums a possibility seems to group everything under a gameobject then use broadcast message. Is this a recommended, or elegant way?