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

19 lines
335 B
C#

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