void OnDestroy() { if (senderIsCreated) { Spout2.CloseSender(sharingName); } }
// Use this for initialization void Awake() { if (debugConsole) { Spout2.initDebugConsole(); } }
void OnEnable() { if (receiver == null) { receiver = target as Spout2Receiver; Spout2.addListener(texShared, senderStopped); updateOptions(); } //Debug.Log ("Enable popup Index : "+popupIndex); }
void Update() { if (texture == null) { return; } if (!senderIsCreated) { senderIsCreated = Spout2.CreateSender(sharingName, texture); } else { Spout2.UpdateSender(sharingName, texture); } }
void OnDestroy() { isReceiving = false; Spout2.clean(); GameObject.Destroy(GameObject.Find("Spout")); }
void Start() { Spout2.addListener(texShared, texStopped); }