- Home /
Is it possible to use SendMessage() on an uninstantiated prefab?
I know it's possible to use SendMessage and BroadcastMessage on gameObjects in the scene using @script ExecuteInEditMode() when the game is not running, but what about on Prefabs in the Projects panel? I need to do this for certain kinds of initialisations. I have an editor script which provides a button to fire the SendMessage() function however nothing is detecting it as I assume the other scripts on the gameobject are not active.
I seriously doubt that. Why would game engine include prefabs in its procesing thread?
Not possible I assume. Are you sure you cannot find a decent workaround?
The work around would be simply dropping the prefab into the scene, doing the intialisation and then placing it back into the prefab hence updating it. This is clearly not the end of the world but it would be nice to know if this is something I don't have to do and if there were methods for working with unintialised prefabs in general.
That's a thought Dave, I'd like to hear from someone who knows implicitly if it's possible or just a totally daft idea first before suggesting it.