VelNet-Unity/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VelNetMan.cs

16 lines
301 B
C#

using UnityEngine;
using VelNet;
public class VelNetMan : MonoBehaviour
{
public GameObject playerPrefab;
// Start is called before the first frame update
private void Start()
{
VelNetManager.OnJoinedRoom += player =>
{
VelNetManager.InstantiateNetworkObject(playerPrefab.name);
};
}
}