DefineSyphonClient() public method

public DefineSyphonClient ( SyphonServerObject, server ) : void
server SyphonServerObject,
return void
Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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();
        }
    }