public static SyphonClientObject AddClientToSyphonClientsList(string appName, string name, SyphonServerObject server) { SyphonClientObject result = GetSyphonClient(appName, name); // Debug.Log(result.BoundAppName + " " + result.BoundName + " was the result"); if (result == null) { // UnityEngine.Debug.Log("DIDNT EXIST: " + appName + "/" +name); //if it was null when trying to add a new client, just add a new one and init. result = ScriptableObject.CreateInstance <SyphonClientObject>(); result.DefineSyphonClient(server); Syphon.SyphonClients.Add(result); } else { // UnityEngine.Debug.Log("EXISTED: " + appName + "/" +name + ". doing nothing."); } return(result); }
public static void AddClientToUnsortedList(string appName, string name, SyphonServerObject server) { SyphonClientObject result = GetSyphonClient(appName, name); // Debug.Log(result.BoundAppName + " " + result.BoundName + " was the result"); if (result == null) { // Debug.Log("DIDNT EXIST: " + appName + "/" +name); //if it was null when trying to add a new client, just add a new one and init. Syphon.UnsortedClients.Add(ScriptableObject.CreateInstance <SyphonClientObject>()); Syphon.UnsortedClients[Syphon.UnsortedClients.Count - 1].DefineSyphonClient(server); Syphon.UnsortedClients[Syphon.UnsortedClients.Count - 1].InitSyphonClient(); } else { // Debug.Log("EXISTED: " + appName + "/" +name); result.DestroySyphonClient(); result.DefineSyphonClient(server); result.InitSyphonClient(); } }