Any other way aside UnitySendMessage?

I want to develop ios plugin for unity. But in document mention only one way to communicate from ios to unity with UnitySendMessage

There is a flaw in this function. I don’t know what happen if the GameObjectName has multiple object with same name. So I don’t want to use it

Are there any other function or way to do, like UnitySendMessage with using InstanceID of object instead? Or direct event delegate of UnitySendMessage? Or passing function pointer to call in C directly?

Thank you very much

The way I handle this is to use my own event based system with delegates where any method can register to receive events, and events can be ‘posted’ or triggered any time via code.

For example, I have an event called ‘GamePaused’.
A character script can register for this event with something like:
Events.Register(Event.GamePaused, MethodNameToCall);
The input manager that checks for the pause key posts something like:
Events.Post(Event.GamePaused);
And thus, the MethodNameToCall will be called.

If such a system appeals to your case, you can find a few great examples on community wiki.
Here is one such example:
http://wiki.unity3d.com/index.php/CSharpNotificationCenter

You can create a separate instance of an event handler class like this one to handle communication within individual objects, and you can also have a ‘global’ instance as well, for game-wide events.

This allows you to have an efficient enum based system without the need for unity’s messaging system, and without the need for any kind of looping through objects or components.

Sorry I can’t help you with your specific issue of having multiple game objects of the same name, but hope this gives you some ideas.