Sorry.... I'm being super needy....
I was soooo close...
Here are my scene's:
Welcome -> Loads Tutorial on channel 100
Tutorial has jump gate to Level1, channel 101
Level 1 has jump gate to Level2, channel 102
Level2 has jump gate to Level 3, channel 103
Level3 has jump gate back to Level1, channel 101
When I cycle around and get back to Level1 it continuously spawns new player ships and repeats the jump gate Debug.Log's (in order) until I stop. In looking over the documentation if my player (the only one) leaves the channel, does the channel AND the scene stay in memory unless I send a RequestCloseChannel?
I'm really sorry to keep bugging you with what are most likely n00b-ish errors but I'm hoping in a few minutes you can steer me in the right direction.
Thanks
and is there a way to get notified when you reply got it under options....
Edit:
If I close the channel just before I join the new channel it seems to work.
Updated Jumpgate.cs
using UnityEngine;
using System.Collections;
using TNet;
public class Jumpgate : MonoBehaviour {
public GameObject jumpTarget;
public int jumpChannel;
void Start ()
{
}
void OnTriggerEnter (Collider col)
{
Debug.Log("Entered gate to: " + jumpTarget.name);
if ( jumpTarget != null && jumpChannel >= 0 ) {
//TNManager.LeaveChannel(); //didn't fix looping error
TNManager.BeginSend(Packet.RequestCloseChannel); // DID fix looping error
TNManager.EndSend();
TNManager.JoinChannel(jumpChannel, jumpTarget.name);
}
}
}
If this the "proper" way then I'll design my game around this. Seems like I'll use a "GalaxyManager" class to manage systems (scenes) and then when each system (scene) loads it will read its update from the manager.