Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ninja

Pages: 1 [2]
16
Oh awesome, thanks so much! Apologies that I don't have pro access, I am considering it though thanks to your amazing support.

17
Hmm, well sometimes the server decides to save the player (still not sure why or when), but I get an EndOfStreamException: Failed to read past end of stream error directly after calling SetPlayerSave to load the save file. OnSetPlayerData isn't called when this happens.

I'm only saving three rather simple strings (the map the player is on, the last spawn point and their inventory).

18
TNet 3 Support / [TNet3 (Feb.8)] SetPlayerSave / SetPlayerData not saving
« on: February 08, 2016, 10:55:23 PM »
Having some saving issues now.

Here's what my game currently does:

OnNetworkConnect:
- TNManager.SetPlayerSave("Players/" + TNManager.playerName + "_" + SystemInfo.deviceUniqueIdentifier + ".dat";);
- JoinChannel

During gameplay, I use TNManager.SetPlayerData for a few variables I want to save on each player, but nothing seems to ever be saved on the server. Not sure if it matters, but I'm saving all the variables in one function, so it calls SetPlayerData more than once.

The OnSetPlayerData notification is working fine. The server just never seems to save anything.

What would be the correct way to handle saving player data in the latest version of TNet 3 (Feb. 8)?

19
TNet 3 Support / Re: [TNet3] Persistent TNObject and changing channels
« on: February 08, 2016, 08:36:09 AM »
Ok awesome, I'll try that out.

Thanks! Keep up the great work!

20
TNet 3 Support / Re: [TNet3] Persistent TNObject and changing channels
« on: February 08, 2016, 02:33:45 AM »
I've been converting one of my projects over from PUN to TNet.

For PUN, the way I had it handling changing maps was by walking onto a trigger which told the player what map to move to, disconnects them from the channel, and in the OnLeftChannel notification it would join the previously set channel specified from the trigger. In PUN you can only be connected to one channel at a time and have to leave before attempting to connect to the next one.

I have a static TNObject that has some RFCs on it that persists through scenes and worked fine in PUN but not TNet.

It's been a while since I've played around with TNet and I haven't worked with multiple channels before, is there a better way to do what I want?

21
TNet 3 Support / [TNet3] Persistent TNObject and changing channels
« on: February 08, 2016, 01:28:13 AM »
I'm having an issue with persistent network objects and joining different channels.

I have a TNObject with DontDestroyOnLoad so it can move between scenes. Everything works fine on Channel 0, but if you change channels (and leave channel 0) it will no longer receive any RFCs.

I've tried to make the TNObject change channels with setting the channelID manually, and also by calling TNObject.TransferToChannel(channelID), but nothing seems to be working.

How do I make the object change channels with the user correctly?

Attaching a small example project that shows what I'm trying to explain.
- Import the attached package into an empty project
- Import TNet3
- Add the three included scenes to the build settings
- Build it and run it along with a server
- While connected, pressing Space will send a RFC to all, and in channel 0 it is received. In any other channel it isn't received.

Pages: 1 [2]