This repository has been archived on 2026-01-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SH-INT/Assets/Scripts/WRTCManager.cs
정영민 f4cf556cde update
2025-02-20 10:30:18 +09:00

31 lines
630 B
C#

using Byn.Awrtc;
using Byn.Unity.Examples;
using SHINT.UI;
using System;
using WI;
namespace SHINT.WebRTC
{
public class WRTCManager : MonoBehaviour, ISingle
{
public Caller caller;
public readonly string mainAddress = "SHINT";
public override void AfterAwake()
{
caller = transform.Find<Caller>();
caller.onActivate += Setup;
caller.onSetupEnd += Connect;
caller.Active();
}
void Setup()
{
caller.Setup();
}
void Connect()
{
caller.Listen("SHINT");
}
}
}