RegisterClientInstance() public static method

public static RegisterClientInstance ( SyphonClientTexture, tex, SyphonClientObject, obj ) : void
tex SyphonClientTexture,
obj SyphonClientObject,
return void
Ejemplo n.º 1
0
//i don't trust that this doesn't crash unity. need more testing.
//	public SyphonClientTexture(){
//		Syphon.syphonScriptCount++;
//	}
//	~SyphonClientTexture(){
//		Syphon.syphonScriptCount--;
//	}
#endif

    void setupTexture()
    {
        //when you initialize the client texture, you should TRY to create the syphon client object.
        //if it needs to exist because the server is available, it will create it. if the server is offline,
        //nothing will happen. this basically initializes a singleton for that particular server appName/name.
        clientObject = Syphon.CreateClient(clientAppName, clientName);
//		if the client object exists
        if (clientObject != null)
        {
            //only registers it if it doesn't already exist.
            Syphon.RegisterClientInstance(this, clientObject);
        }
    }