playMaker

Author Topic: Photon server tutorial  (Read 16286 times)

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
    • SneakOnTheLot.com
Re: Photon server tutorial
« Reply #15 on: June 08, 2013, 10:27:51 AM »
Okay... I'm finally starting to see the light at the end of the tunnel. 

I've got the demo working now from within Unity.

The issues I'm having now seem to be in the output build and run.

I add that demo scene to the scene list in the build settings and press build and run. .. but it won't run.  It gives me a few more errors now.

They seem to be minor FSMs and that's why it's not killing the whole thing, but it is stopping it from building and running.  This is the page in the tutorials that it is having issues with.
https://hutonggames.fogbugz.com/default.asp?W872

The error is:
Remote Event not set
Chat:Chat target gui: send RPC chat : PhotonViewRPCBroadcastFsmEvent

I can see the issue when I open the FSM in question.  What remote event should that be?  All I have in the dropdown menu is none, room is busy, room is empty, photon/master client switched.

I'm almost there... please help this poor beggar!






Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
    • SneakOnTheLot.com
Re: Photon server tutorial
« Reply #16 on: June 08, 2013, 12:55:37 PM »
Okay... this is interesting and should be of some interest to those out there who may be having the same issues.

The main issue with not having the CHAT RPC CALL event in the needed dropdown window was because of several obsolete code bits in a few of the C# scripts in the demo. 

It was:
active = true;

When it needed to be

SetActive(true);

Once I changed that I started to get the proper options in the dropdown windows.

There are still a few warnings that I need to fix now... again with the obsolete code.  This time it's GetTriangleStrip(int). 

With any luck, fixing those will let me build and run this thing.


Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
    • SneakOnTheLot.com
Re: Photon server tutorial
« Reply #17 on: June 08, 2013, 01:29:37 PM »
Okay... Fixed all the errors and updated the C# scripts to correct the obsolete code. 

Happy to report that the demo is now working!!!

Bad news is it won't build and run.  After building, the Unity icon bounces in the tray on my screen once, then goes away and the app never gets going.

At this point I'm sorta at a loss.  I've fixed everything that was broken but it won't build.

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
    • SneakOnTheLot.com
Re: Photon server tutorial
« Reply #18 on: June 08, 2013, 01:33:20 PM »
Sorry about all these posts.  I just figured yall would want to know that I just got it working.

Future reference, don't "/" in the name of your app when you build it.  It won't build.

Thank you to everyone who was pulling for me.

Thanks also to the responses from the PlayMaker group!!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12405
  • Official Playmaker Support
    • View Profile
Re: Photon server tutorial
« Reply #19 on: June 09, 2013, 10:03:45 PM »
Hi,

 Ok, thanks for the findings, I'll fix these issues for Unity 4.

 also, don't use spaces in your path to your project, that also doesn't work very well with some frameworks and tools, I can't remember when I had this, but it was definitly frustrating... :)

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12405
  • Official Playmaker Support
    • View Profile
Re: Photon server tutorial
« Reply #20 on: June 09, 2013, 11:05:25 PM »
Hi,

 Have you solved this? you have other threads on the case. Just to check.

bye,

 Jean

Fletch

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
    • SneakOnTheLot.com
Re: Photon server tutorial
« Reply #21 on: June 10, 2013, 08:31:13 AM »
It's almost working.... but no.

I get no errors now and it all seems to work.  But then in testing the following happens.

1st player enters the room and instantiates. 
2nd player enters the room and instantiates but also destroys all who instantiated before them.

Following this, the 1st player can still see the 2nd player running around but the 2nd player sees no one.

A warning comes up in the log when the 2nd player instantiates.  Here it is:

OnDestroy for PhotonView View (0)1001 on Player : Guest 2805  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)


Please help me!!!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12405
  • Official Playmaker Support
    • View Profile
Re: Photon server tutorial
« Reply #22 on: June 10, 2013, 10:12:42 PM »
Hi,

 Lots of struggle for you, we'll get there! I am not sure what happens on your end at the moment,

Are you on unity 3? 4? windows? mac? and where do you publish? web, desktop?


bye,

 Jean

Iamnew

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: Photon server tutorial
« Reply #23 on: July 27, 2013, 03:46:35 PM »
Hi guys! I see that this thread has been inactive for a while, but I am fumbling around with photon, and stumbled across some fatal errors

I started a fresh Unity project
I imported Playmaker from the asset store
I then opened the playmaker photon test-scene

Once the photon setup was completed and everything was green, i hit play. So far no problems - However, When i clicked "create room" and spawned as player1, the game paused in the editor and gave me the following error in the log:

Code: [Select]
Could Not Create Action: Fsm Photon player(Clone): Custom Property: delete property: PhotonNetworkDeleteOwnerCustomProperty (Maybe the script was removed?)
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(FsmState, Int32)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState)
HutongGames.PlayMaker.FsmState:LoadActions()
HutongGames.PlayMaker.Fsm:InitData()
HutongGames.PlayMaker.Fsm:Init(MonoBehaviour)
PlayMakerFSM:Init()
PlayMakerFSM:Awake()
UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
NetworkingPeer:DoInstantiate(Hashtable, PhotonPlayer, GameObject) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1962)
PhotonNetwork:Instantiate(String, Vector3, Quaternion, Int32, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1498)
PhotonNetwork:Instantiate(String, Vector3, Quaternion, Int32) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1443)
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: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()

Looks like there was an error instantiating the player =(

Any help?

Thanks in advance,

-The new guy

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12405
  • Official Playmaker Support
    • View Profile
Re: Photon server tutorial
« Reply #24 on: July 29, 2013, 07:15:49 AM »
Hi,

 yes, I forgot to remove this test fsm on the player. Please find a corrected prefab that will not have the offending fsm. The next releas of Photon for PlayMaker will have everything back to normal.

bye,

 Jean