VelNet-Unity/TestVelGameServer/Packages/VelNetUnity/Samples/BasicExample/Scripts/BasicVelNetMan.cs

13 lines
314 B
C#

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