How would you go about sending a message to an object that has just been instantiated? For example, I want to instantiate a bullet with a script with a “strength” value attached to it. But I want the strength value to be edited by the script of the object firing it so I can use the same bullet object but with different strengths.
What I did was this:
Instantiate(bullet,transform.position,transform.rotation);bullet.SendMessage(“SetStrength”, 200.0);
But it doesn’t seem to work - and I think I know why. What I don’t know is, how to make it work.
Any help would be greatly welcomed, thank you!