public class SysTriggerSystemGeneration : MonoBehaviour {
void OnNetworkJoinChannel ( bool success, string message)
{
Debug.Log ("Player joined channel " + TNManager.channelID);
GameObject g = (GameObject)GameObject.Find ("IsSystemInitialized");
int channelID = TNManager.channelID;
Debug.Log("Looking for IsSystemInitialized...");
if (g == null) {
Debug.Log("... not found");
if (TNManager.isHosting) {
Debug.Log("I am host, crating flag");
GameObject isInit = (GameObject)Resources.Load("Prefabs/Tools/IsSystemInitialized");
isInit.name = "IsSystemInitialized";
TNManager.Create(isInit, true);
Debug.Log("Done.");
}else {
Debug.Log("No initialized, but I may not create it...");
}
} else {
Debug.Log("... found! Star System is already existing");
}
}
}