playMaker

Author Topic: Photon Demo Destroys Players  (Read 3253 times)

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • SneakOnTheLot.com
Photon Demo Destroys Players
« on: June 08, 2013, 05:06:39 PM »
It's taken quite a bit of work but I got the Photon/PlayMaker DemoWorker scene working.  First let me just say that I find it amazing that Playmaker is capable of this type of complication.  I'm very impressed.

That being said, I get no errors when I run it and and others can connect and run around.  It's really slick.  But any new player joining the fun can't see any of the players who came before them.  The first player in will see everyone.  So somewhere there is code that is destroying all the player objects when a person enters the game.

Here is the Warning message I get.  I get one for each player that it destroys when the person enters the room.  It only destroys them for their client machine though.  To everyone else they're still there running around.

OnDestroy for PhotonView View (0)1001 on Player : Guest 3009  but GO is still in instantiatedObjects. instantiationId: 1001. Use PhotonNetwork.Destroy(). Loading new scene caused this.
UnityEngine.Debug:LogWarning(Object)
PhotonView:OnDestroy() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/Extension/PhotonView.cs:189)

And the last thing is just an annoyance that can be fixed pretty easily.  The chat input box doesn't clear after sending a message.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Demo Destroys Players
« Reply #1 on: June 10, 2013, 01:34:01 AM »
Hi,

 I'll look into this,

as for the chat not clearing up , this is very minor, it's already down to what you will want to do in your own implementation. Here the demo is really focusing on how to work with Photon itself. The way you select rooms is also almost never how you actually implement it visually for example.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Demo Destroys Players
« Reply #2 on: June 11, 2013, 06:13:22 AM »
Ok,

 I can testify that all is working very well on both unity 3.5 and unity 4. One thing to look at:

 it looks to me that you are out of synch with the demo. Make sure you always download the photon samples from the hutongs, when you update playmaker, they go together, a previous sample package WILL NOT WORK with a new playmaker update, Photon network plugins evolves very quickly, and we try to follow and be on par with the one you can get manually from the asset store. Also we improve the demos and internal scripts as well, so it's always mandatory to make sure you have everything up to date.

-- also, you should not mix previous builds with new builds, for example, if you have published this demo a while ago and now play from the editor and run that old app you may experience issues, and compatibiliy problem simply because for one, the player prefab is different. So at least for this demo this is not recommanded.

 Keep me updated, if you still have problems, maybe I will set up a gotomeeting with you to get to the bottom of this issue, cause I can't replicated this, only if I start messing with versionning, which is of course breaking everything.

bye,

Jean

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • SneakOnTheLot.com
Re: Photon Demo Destroys Players
« Reply #3 on: June 11, 2013, 10:43:12 AM »
Not sure what happened but I went through all the steps again (for the 7th time) and now it's working.  I didn't change anything I was doing.  Oh well, just glad it's working!

Thanks for sticking to it with me!

I love your product!!!