C# Call a funtion in many scripts

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?

Well, I would say events are what you’re looking for. You would have to have the one object fire an event and every object that is listening to that object would hear the event and react accordingly, but you would still have to declare the delegate script within the script that is listening because, otherwise it would never ‘hear’ the event.

Another option would be to tag all of the objects that need to do the function with a certain tag and iterate through the tagged object with FindObjectsWithTag, but I think this would be slower and less elegant than what I mentioned above.

I have heard that broadcast message is slower than events in C#