D
D
Danil Afanasiev2017-10-09 01:06:42
Game development
Danil Afanasiev, 2017-10-09 01:06:42

There is a line SendMessage('MyGameObject', 'MyFunction');, what should be in the receiving function?

Hello everyone, I'm making a game for the web on Unity. there is a line SendMessage('MyGameObject', 'MyFunction',3); which passes the value from the HTML page to the unit("Object","Function",Value(may be empty)). What should be in this function?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Maximovich, 2017-10-09
@danil_afan

The arguments can be anything, depending on your needs. Drive json in both directions and you will be happy. The receiving function should be something like this: MyFunction(string arg)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question