- Home /
Sending a message from javascript to C#
Im trying to send a message from javascript to C# (my plugin is written in C#), but the C# script doesn't recieve it, it gives me the "SendMessage HideBanner has no receiver!" error.
My javascript script:
parentobject.SendMessage("HideBanner");
My C# script:
void HideBanner () {
bannerView.Hide();
}
Is the receiving script attached to a disabled gameobject?
Perhaps it's a scoping thing, replace Send$$anonymous$$essage with Broadcast$$anonymous$$essage and see if it gets picked up by the method.
Answer by Hypnotoad0 · Jul 14, 2014 at 01:36 PM
Silly me, i was sending the message to a wrong object.
case closed.
Your answer
Follow this Question
Related Questions
How to make a List or Array of functions with type Void 4 Answers
start called directly after instantiate? 1 Answer
How to call a function from another script in C# from array? 1 Answer
Check if a function is no longer being called? 3 Answers
How to activate a function (or equivalent) in a specific gameobject 1 Answer