playMaker

Author Topic: error with photon view  (Read 6623 times)

invayne

  • Full Member
  • ***
  • Posts: 105
error with photon view
« on: February 20, 2015, 10:46:36 AM »
i keep getting a photon view error saying i got a fsm with var's checked for network synched and it says i dont have a photon view  component watching this fsm. ive gone through my fsm many times and checked every variable 1 by one to make sure none of them where checked for network synching. now i do have 1 fsm which is my var repository that i use for all my network synch vars which i do have set up to be watched by the photon view but it dosent seem to be watching that fsm even though i have dragged and dropped it into the photon view. i have deleted and re added the photon view 5 times and re added the fsm to it but im still pulling the error. the error i get is this

Fsm component 'Body' on gameObject 'Body' has variable checked for network synching, but no PhotonView component is observing this fsm
UnityEngine.Debug:LogError(Object)
PlayMakerPhotonProxy:SanitizeGameObject(GameObject) (at Assets/Photon Unity Networking/PlayMaker/Scripts/PlayMakerPhotonProxy.cs:162)
PlayMakerPhotonGameObjectProxy:Awake() (at Assets/Photon Unity Networking/PlayMaker/Scripts/PlayMakerPhotonGameObjectProxy.cs:70)
UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
NetworkingPeer:DoInstantiate(Hashtable, PhotonPlayer, GameObject) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2051)
PhotonNetwork:Instantiate(String, Vector3, Quaternion, Int32, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1553)
PhotonNetwork:Instantiate(String, Vector3, Quaternion, Int32) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1498)
HutongGames.PlayMaker.Actions.PhotonNetworkInstantiate:doInstantiate() (at Assets/Photon Unity Networking/PlayMaker/Actions/PhotonNetworkInstantiate.cs:95)
HutongGames.PlayMaker.Actions.PhotonNetworkInstantiate:OnEnter() (at Assets/Photon Unity Networking/PlayMaker/Actions/PhotonNetworkInstantiate.cs:48)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:Start()
HutongGames.PlayMaker.Fsm:ProcessEvent(FsmEvent, FsmEventData)
HutongGames.PlayMaker.Fsm:Event(FsmEventTarget, FsmEvent)
HutongGames.PlayMaker.Fsm:Event(FsmEvent)
PlayMakerFSM:OnLevelWasLoaded()


theres no other vars checked for network synching except the ones in the var repository

invayne

  • Full Member
  • ***
  • Posts: 105
Re: error with photon view
« Reply #1 on: February 20, 2015, 12:24:10 PM »
i also like to add that this photon view thats tossing  me the error is on a child object of the parent  object. the parent object also has a photon view on it.  the reasoning on this is the fact that the parent object is mainly the fps controller. the child object is the body that is seen over the network. as of now if i ignore the warnings and build and run it by having the extra photon view on the child object i can now get the child object moving across the network ( no animation synch done just yet) but it does update the position of that object and rotation like i need it to. so i dont under stand why im getting this error if its working like its suppose to. 


edit: just to add to this i also have to playmaker animator synch scripts  on this object to that also watch the same var repository. due to having the states set up in the fsm to be watched over the network
« Last Edit: February 20, 2015, 12:27:17 PM by invayne »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: error with photon view
« Reply #2 on: February 24, 2015, 03:32:56 AM »
Hi,

 I never worked with nested photon View. I don't think it's a good idea out of the blue. I usually have one photonView at the root of the prefab, and host all my synch variables their, then all fsm and childs go write and read variables on that sole place, I find this a lot more sane for my brain to deal with when I have bugs like this :)

also, it really enforce to limit the amount of data you are going to synch, where if you have multiple photonview you may loose the overview and start asking too much for the network and you'll get bad results with latency and drag...

Can you paste the exact error?

Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: error with photon view
« Reply #3 on: February 24, 2015, 06:11:39 AM »
its the error in the top post ...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: error with photon view
« Reply #4 on: February 24, 2015, 06:35:36 AM »
Hi,

 Can you send the screenshows of the inspector showing the photonView setup?

 Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: error with photon view
« Reply #5 on: February 24, 2015, 06:54:45 AM »
this is the parent object




this is the child which id the body for thirdperson awareness and 3rd person over the network


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: error with photon view
« Reply #6 on: February 24, 2015, 07:48:21 AM »
Hi,

 sorry, they are of low quality, I can't read anything ( unless I am missing the way to see them at their full scale?)

 Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: error with photon view
« Reply #7 on: February 24, 2015, 07:53:35 AM »
rigth click and open image in new tab there 1920  by 1080  so there very high res :p

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: error with photon view
« Reply #8 on: February 24, 2015, 09:14:57 AM »
Hi,

 ah yes, I got it now.

 You have errors in the console, are you sure it's not affecting the game?

that's very odd.

 can you pm me with a package with this prefab?

 Bye,

 Jean


Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: error with photon view
« Reply #9 on: February 24, 2015, 09:31:01 AM »
error comes from my ork wrapper thats got vars not being used and a few with my other fsm's that are not receiving the objects they need to be receiving. nothing to do with the view  yeah i can if you got unity 5...

invayne

  • Full Member
  • ***
  • Posts: 105
Re: error with photon view
« Reply #10 on: February 24, 2015, 09:33:13 AM »
also a funny thing is that the view works but its just throwing an error. so not sure whats going on..

edit: i just realized its probably due to me using unity 5 with 1.7.. so i think alot of my issues are being caused from that but my boss wants the game  developed  in unity 5. so hopefully when 1.8 is is released it'll fix my issues. also sent you a pm about a earlier thread.
« Last Edit: February 24, 2015, 10:27:51 AM by invayne »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: error with photon view
« Reply #11 on: February 24, 2015, 01:55:35 PM »
Hi,
 

Uhm.. that would be a possible source of problem indeed. I haven't yet tried photon on Unity 5, I'll try this tomorow, but of course, PlayMaker isn't official compatible with Unity 5 until 1.8 comes out... so not really the best way to go if you are on a project with a deadline.

 if you want to be part of the beta let us know.

 Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: error with photon view
« Reply #12 on: February 24, 2015, 04:16:13 PM »
yeah i would like to get access if possible what do i need to supply in order to get access?

beaumint

  • Playmaker Newbie
  • *
  • Posts: 15
Re: error with photon view
« Reply #13 on: February 25, 2015, 01:22:20 PM »
Just thought I would chime in here real quick...
I had a prefab I was using like crazy in my online game and I wanted to add a non-moving UI canvas (with skill cooldowns and whatnot) and to prevent it from following my prefab I ended up putting my prefab in an EMPTY game object. 

It really threw off all the photon stuff, it kept giving me the same errors, 'game component has a network sync setting that doesn't have a photon view attached.'  but I hadn't changed anything...

Long story short, I fixed it by doing what Jean suggested.  I took all of the variables that were being viewed by photon and kept them out of all children objects and put it all on my brand new empty game object that was parenting everything.  It fixed it all instantly.

Just thought I'd throw in my 2 cents.  It just happened to me yesterday, haha.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: error with photon view
« Reply #14 on: February 25, 2015, 01:33:59 PM »
Hi,

 Thanks for this addition, I'll try to repro this case and discuss this with the photon guys, maybe there is a trick, or it's by default you can't nest networkviews or else.

 Bye,

 Jean