70 lines
1.3 KiB
C#
70 lines
1.3 KiB
C#
using Byn.Awrtc;
|
|
using Byn.Awrtc.Unity;
|
|
using Byn.Unity.Examples;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using WebRtcCSharp;
|
|
using WIFramework.UI;
|
|
|
|
public class Hands : MonoBehaviour
|
|
{
|
|
/*
|
|
WebRTCManager rtcManager;
|
|
public ICall myCall;
|
|
[SerializeField] public bool isDummy;
|
|
|
|
public NetworkConfig netConfig = new NetworkConfig();
|
|
|
|
private void Update()
|
|
{
|
|
if (myCall != null)
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.K))
|
|
{
|
|
OnClick_Button_Send();
|
|
}
|
|
//update the call
|
|
myCall.Update();
|
|
}
|
|
}
|
|
|
|
public void Initialize(bool isDummy)
|
|
{
|
|
this.isDummy = isDummy;
|
|
OnClick_Button_Join();
|
|
}
|
|
|
|
public void OnClick_Button_Join()
|
|
{
|
|
Setup();
|
|
}
|
|
|
|
private void Setup()
|
|
{
|
|
myCall = UnityCallFactory.Instance.Create(netConfig);
|
|
myCall.CallEvent += rtcManager.CallEvent;
|
|
Debug.Log("Setting");
|
|
}
|
|
|
|
public void Send(string msg)
|
|
{
|
|
if (String.IsNullOrEmpty(msg))
|
|
{
|
|
return;
|
|
}
|
|
|
|
myCall.Send(msg);
|
|
}
|
|
|
|
|
|
public void OnClick_Button_Send()
|
|
{
|
|
rtcManager = FindObjectOfType<WebRTCManager>();
|
|
Send(rtcManager.GetRightHandRawData(this)); //hands À§Ä¡°ª ¹Þ¾Æ¿Í¼ º¸³¿
|
|
}
|
|
*/
|
|
}
|
|
|