Пример #1
0
 void OnDestroy()
 {
     if (senderIsCreated)
     {
         Spout2.CloseSender(sharingName);
     }
 }
Пример #2
0
 // 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);
    }
Пример #4
0
 void Update()
 {
     if (texture == null)
     {
         return;
     }
     if (!senderIsCreated)
     {
         senderIsCreated = Spout2.CreateSender(sharingName, texture);
     }
     else
     {
         Spout2.UpdateSender(sharingName, texture);
     }
 }
Пример #5
0
 void OnDestroy()
 {
     isReceiving = false;
     Spout2.clean();
     GameObject.Destroy(GameObject.Find("Spout"));
 }
Пример #6
0
 void Start()
 {
     Spout2.addListener(texShared, texStopped);
 }