Author Topic: Bizarre Behavior TNObject.Send when ID is 0  (Read 2227 times)

Masaaki

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Bizarre Behavior TNObject.Send when ID is 0
« on: August 25, 2013, 01:57:46 AM »
Hello,
I encountered a rather bizarre issue that seems to be caused by having a TNObject with ID 0. For whatever reason, if I call TNObject.Send, the message never arrives until I shut down the server (which I was doing in OnApplicationQuit, in Unity Editor this meant the message was arrived and processed AFTER I had already exited playmode - as you can imagine that created some amount of havok in my scene). Setting the TNObject's ID to 1 resolves this - but as 0 is the default ID it seems like this should either generate a warning (and have the default ID be 1), or the underlying issue should be fixed so objects can have ID 0.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bizarre Behavior TNObject.Send when ID is 0
« Reply #1 on: August 25, 2013, 02:15:32 PM »
Yes, ID of 0 is not valid at run-time. It's used on prefabs to indicate that the instantiated object should obtain an ID when instantiated.

Masaaki

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Bizarre Behavior TNObject.Send when ID is 0
« Reply #2 on: August 25, 2013, 09:42:52 PM »
Ah, that's cool. Just might be nice if it could somehow warn you that ID 0 is not valid if the object is in the scene.