1
TNet 3 Support / Cant clear channel data after player exit
« on: January 12, 2017, 12:43:08 PM »
hi. my players sometimes write data on channel. (example tno.isMine TNManager.SetChannelData("info", +1)
i cant find good way how clear it. (players lose connection or use alt+f4 to exit from game)
1. i create empty "sample object" and write data to it. (TNManager.Instantiate FALSE)
then players off - object destroy, and i use code in Destroy() void - every players send ("info", -1) - wrong result.....
2. i added if tno.isMine - sometimes clear info, sometimes no... (players lose connection or use alt+f4 to exit from game)
3. okay i create new object (TNManager.Instantiate TRUE) for ONE player - its my virtual host. it player clear data other players.
yes, now data others players clear a good. Then player a leave object change owner to next player, object have tno.isMine
and clear data for One player, but sometimes its clearing data for new Owner too...

i cant find good way how clear it. (players lose connection or use alt+f4 to exit from game)
1. i create empty "sample object" and write data to it. (TNManager.Instantiate FALSE)
then players off - object destroy, and i use code in Destroy() void - every players send ("info", -1) - wrong result.....
2. i added if tno.isMine - sometimes clear info, sometimes no... (players lose connection or use alt+f4 to exit from game)
3. okay i create new object (TNManager.Instantiate TRUE) for ONE player - its my virtual host. it player clear data other players.
yes, now data others players clear a good. Then player a leave object change owner to next player, object have tno.isMine
and clear data for One player, but sometimes its clearing data for new Owner too...

What is it? my debag log show me -1, i fix to tno.Send("SetMyVariable", Target.AllSaved, (playerSearchNumber += 40)); when debug show me 39 79... etc every time then i click but in 1 client not all. (1 client is unity editor 2 client bilded game) i click, click, click in bilded game to much, then i click in unity editor, he show me 39 79... not more...