Raise Event alternative in Fusion?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Raise Event alternative in Fusion?

kashiftasneempro
2022-05-27 04:39:22

Hi. I have a game developed in PUN 2 and I will be porting it to Fusion.

I am using "PhotonNetwork.RaiseEvent". What will be its alternative in Fusion?

Comments

ramonmelo
2022-06-30 11:52:19

Hi @kashiftasneempro ,

First of all, you should avoid using any kind of ReiseEvent, which in Fusion can be translated into the use of RPCs, as they are not part of the Game State, and will not be sent to any late joiners.

We suggest relying on data that is part of the Game State (is described as Networked property of a NetworkObject) instead. And just adjusting and reacting to the changes.

If you want to send a piece of information to another peer, as said, you can use RPCs, take a look here for more info: https://doc.photonengine.com/en-us/fusion/current/manual/rpc

--

Ramon Melo

Photon Fusion Team

Back to top