Author Topic: Required to Join Channel/Load New Scene to use RFC/See Other Players?  (Read 8856 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Required to Join Channel/Load New Scene to use RFC/See Other Players?
« Reply #15 on: August 01, 2013, 02:47:30 PM »
RFC ID limit is 255. Static TNObject IDs have a soft limit of 32767.

pyscho2day

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: Required to Join Channel/Load New Scene to use RFC/See Other Players?
« Reply #16 on: August 03, 2013, 07:02:17 PM »
I have had the same issue now as well.  I did as Jeremy mentioned and just recreated the GameObject and now it works.  I wonder if something got stuck when upgrading.

Just to note, it was a static Empty GameObject with 1 script and the TNObject Script.

aikshutan

  • Guest
Re: Required to Join Channel/Load New Scene to use RFC/See Other Players?
« Reply #17 on: August 17, 2013, 05:34:40 AM »
Hi,

I encounter the same problem as well. My scene is pretty simple. A sphere with tnObject ID 10. Apparently the tno ID is not capture or response the way it should be.
I tried RFC(ID) too, but it don work too.

The project contain 2 scene, first is login.scene (when detected LAN server/ host, it will connect and join the channel, and launch my second scene "TestRFC.scene", that is where the sphere gameobject store in.)
I could see the sphere(this mean editor had connected to tnet lan server), upon clicking on sphere, "Unable to execute function xxxx. Did you forget an [RFC] prefix, perhaps?"

these are the codes attach to sphere gameObject
        void OnPress(bool Status)
   {
      if (!Status) return;
      tno.Send(1,Target.All, 12);
      
   }
   
[RFC(1)] void ReceivePressOnTime (int Timing)
   {
      MyCount+=1;
      print("MyCount: " + MyCount);
      print ("ReceivePressOnTime :   " +Timing);
   }

It work when i delete the (original scene asset) sphere gameObject, and recreate a new one, and reattach TNObject component, set the id to 10, and my class which react to OnPress. Then it suddenly work. I don have chance to try restart Unity Application to test whether or not the problem will solve by restarting the unity or window.

Somehow i manage to find the steps to recreate the problem.
I going to repeat the step for creating second scene : TestRFC.scene
New Scene
Attach TouchHandler.cs to Camera gameObject
Create a sphere gameObject
Attach TNObject (don set any id, left the id to default 0)
Save scene
Open Login scene. (any TNManager component which can connect to Standalone server, make sure loadlevel "TestRFC" when joining channel)
Run LoginScene (when TestRFC scene was loaded, try click on the sphere. By right, nothing should be flag out in message, as i guess 0 is not meant for communicating..)
Stop the game, launch TestRFC.scene
Change the TNObject id to 1, then save, and run Login.scene
Upon clicking on the sphere, the alert "Unable to execute function with ID of '1'. Make sure there is a script that can receive this call."
After this point, no matter what number u change in tno.id, the same error will occur.
If you delete the sphere gameObject, and recreate it, reattach all require components, but do remember to fill in tno.id to not 0, then save and test run. Then it work.

Basically, my cause for this is, i forgot to set TNObject ID when i attached it in first place. Hope this help you to recreate the problem. Sorry for my english.

pyscho2day

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: Required to Join Channel/Load New Scene to use RFC/See Other Players?
« Reply #18 on: August 17, 2013, 04:14:49 PM »
I was able to duplicate the error with and object by just changing the object ID in the TNObject script.  Instead of recreating the entire object i just removed the TNObject script, saved the scene, and added it back and set to the new ID and it is now working.

Any thoughts on this Aren?

Actually i just saw that there is an update.  I will see if i can still reproduce after updating.
Guess i will have to try later, its not on the asset store yet. 

/twiddles thumbs while waiting for it to get approved
« Last Edit: August 17, 2013, 04:21:21 PM by pyscho2day »

aikshutan

  • Guest
Re: Required to Join Channel/Load New Scene to use RFC/See Other Players?
« Reply #19 on: August 17, 2013, 09:48:24 PM »
You are right, by removing tnobject, and reassign it back and set the id, the problem will solve.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Required to Join Channel/Load New Scene to use RFC/See Other Players?
« Reply #20 on: August 18, 2013, 06:32:00 AM »
I just followed your steps to the letter, and everything worked as expected -- no issues.

One odd thing I did notice though, I ran the scene with the TNObject ID of (0), clicked on it 3 times -- nothing, as expected. I then stopped the game, went into the scene directly, and saw the click result (Debug.Logs in my case) -- so the functions were executed in edit mode as soon as I went back to the scene.

But aside from that, everything worked correctly.

Unity 4.2 / TNet 1.8.0.

aikshutan

  • Guest
Re: Required to Join Channel/Load New Scene to use RFC/See Other Players?
« Reply #21 on: August 19, 2013, 12:40:57 AM »
After solving the router port forwarding issue, i can never recreate the same problem address in this post again. Kind of weird, bt i don think that is the reason that causing it. (Btw, i did run Normalize IDs yesterday, nt sure is that make the different. I shall stop guessing ard. It all work all fine for me now)
Thanks!

Unity 3.5.7 / TNet 1.7.3