Events not called at all

Hi!

http://imgur.com/a/zIuHk

I’m having some unexpected behaviour with Events sent to a specific Entity. I’ve resorted to using the Bolt tutorial found here: http://doc.photonengine.com/en/bolt/current/getting-started/bolt-103-events

I’ve done exactly as the tutorial says, however I can never get the Event to raise at all on either the Host or Client. Let me explain.

I’ve defined an Event called “EventTest” with one property called “message” of the type string [1] (these refer to an image in the Imgur album. 1 being the very first).

I’m trying to call this Event on the other players (and local player) in the scene using the following code in [2].

When a player receives the Event I print the message in the Bolt Console as seen in [3]

But as you can see in the following picture [4] of the Bolt Console there is never a messaged called “Received on remote clients :” + RANDOM NUMBER. (“Received on remote clients” may be not be correctly worded, as this should also be called on the local player, but bare with me).

On the receiving clients (not the owner) I get the messages seen in [5]

As you can see in the Bolt Consoles [4] and [5] It never prints “Received on remote clients :” + RANDOM NUMBER as it should. Never. The event is never raised (despite it saying it) - if it did it would’ve printed the message seen in [3]

I derive from Bolt.EntityEventListener [6], which of course, is the State of the player as they do in the tutorial.

I have no idea why this isn't working. Bolt is clearly sending and receiving this event, but just never calls the function associated with it.

If any of you have ideas as to why this isn't working, please let me know.

Thank you.

Best Answer

Answers

  • I think you need to do BoltConsole.log instead
  • stanchion said:

    I think you need to do BoltConsole.log instead

    No. That's not the issue. Whatever I do OnEvent(EventTest e) is never being called. It won't even log to Unity's Console via Debug.Log("Whatever"). Besides BoltConsole.Write(); works just fine.

    Thanks though.
  • Can you upload your project so I can take a look?