playMaker

Author Topic: Photon(PUN) Scene Object Sending RPC got error, Help![SOLVED]  (Read 2112 times)

human890209

  • Junior Playmaker
  • **
  • Posts: 62
Photon(PUN) Scene Object Sending RPC got error, Help![SOLVED]
« on: September 26, 2016, 08:14:58 PM »
Hi,

I'm using scene object which is not instantiated by Photon, just put with the edit as a part of the level scene. I put Photon View and Playmaker Photon Game Object Proxy on the scene object to Sync and Send RPC, and the Fsm is observed by the Photon View.

But it comes the error, which I attached below.
I opened with the VS, it seems the EventTarget is the error target.


I look up the PUN Documents, Photon allow to put Photon View on scene object to operate same as Instantiate Scene Object and controlled by Master Client.

Quote
Networked Scene Objects

It is perfectly fine to place PhotonViews on objects in a scene. They will be controlled by the Master Client by default and can be useful to have a "neutral" object to send room-related RPCs.

Important: When you load a scene with networked objects before being in a room, some PhotonView values are not useful yet. For example: You can't check isMine in Awake() when you're not in a room!

Cause there are many Network Sync Scene Objects, I don't want to write down every object's Transform and Instantiate it, that will take a lot time to work and not 
good to mantaine and update. Cause you couldn't see the effect of all the level scene Networked objects.
« Last Edit: September 27, 2016, 03:25:23 AM by jeanfabre »

human890209

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon(PUN) Scene Object Sending RPC got error, Help!
« Reply #1 on: September 26, 2016, 09:50:21 PM »
I've found the Problem. My bad, I instantiated the Playmaker Photon Proxy Prefabs not by Photon Instantiate. So the Proxy did't get a legal Photon View ID and that seems breaks this scene object's Event Target, too. I put the Proxy Prefabs directly in the scene and everything just be fine.