- Home /
The player doesn't receive a message from Clones
Working on a game, and ran into an issue. I recently made an enemy prefab so that I could add random enemies into the game, but these clones do not seem to be sending the message to the player. The clones are able to receive message from the player. And My code works fine on the non-clone cubes I still have in my game, but each time I hit a clone cube, I get the message
"SendMessage Checker has no receiver!"
I have all of the variables for my cubes the same(both regualr and clones), but only the non clones seem to send a message to the player. Anybody know why this would be the case? If you need anymore information, please let me know.
Answer by Andres-Fernandez · Sep 16, 2014 at 08:04 AM
It may be that the clones don't have the reference to the player because you probably linked the player to the enemy prefab in the editor. To fix it you can either make your clones Find your player (which can have an impact at runtime) in their start function or just link the player to the clone through the spawner object (have a reference to the player in the spawner object and set the public variable of the clone to that reference right after you spawn the enemy).
Your answer
Follow this Question
Related Questions
Ignoring collisions with clones 3 Answers
collison on trigger for multiple clones 1 Answer
Affect only one clone from multiple clones? 1 Answer
Collision between two moving clones 0 Answers
Object Only Colliding Occasionally 1 Answer