VelNet-Unity/TestVelGameServer/Packages/VelNetUnity/Samples/VelVoiceExample/Scripts/GameManager.cs

15 lines
358 B
C#

using UnityEngine;
using VelNet;
using VelNet.Voice;
public class GameManager : MonoBehaviour
{
public GameObject playerPrefab;
public VelVoice velVoice;
private void Start()
{
VelNetManager.OnLoggedIn += () => VelNetManager.JoinRoom("BasicExample");
VelNetManager.OnJoinedRoom += _ => { VelNetManager.NetworkInstantiate(playerPrefab.name); };
}
}