예제 #1
0
 protected virtual void OnEnable()
 {
     if (debugConsole)
     {
         Spout.instance.initDebugConsole();
     }
     _impl = new SpoutSenderImpl(sharingName, textureFormat, texture);
 }
예제 #2
0
 protected virtual void OnDisable()
 {
     Debug.Log("SpoutSender.OnDisable");
     if (_impl != null)
     {
         _impl.Dispose();
         _impl = null;
     }
 }
예제 #3
0
 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);
 }
예제 #4
0
 protected virtual void OnDisable()
 {
     if (_impl != null)
     {
         _impl.Dispose();
         _impl = null;
     }
     if (_tex != null)
     {
         Destroy(_tex);
         _tex = null;
         NotifyOnUpdateTexture(_tex);
     }
 }