protected virtual void OnEnable() { if (debugConsole) { Spout.instance.initDebugConsole(); } _impl = new SpoutSenderImpl(sharingName, textureFormat, texture); }
protected virtual void OnDisable() { Debug.Log("SpoutSender.OnDisable"); if (_impl != null) { _impl.Dispose(); _impl = null; } }
public virtual void Rebuild() { Destroy(_tex); _tex = new RenderTexture(width, height, depth, format, gamma); _tex.Create(); if (_impl != null) { _impl.Dispose(); } _impl = new SpoutSenderImpl(sharingName, textureFormat, _tex); NotifyOnUpdateTexture(_tex); }
protected virtual void OnDisable() { if (_impl != null) { _impl.Dispose(); _impl = null; } if (_tex != null) { Destroy(_tex); _tex = null; NotifyOnUpdateTexture(_tex); } }