Mirror/Unity-Technologies-networking/Runtime/NetworkStartPosition.cs

23 lines
472 B
C#
Raw Normal View History

#if ENABLE_UNET
using System;
using UnityEngine;
namespace UnityEngine.Networking
{
[DisallowMultipleComponent]
[AddComponentMenu("Network/NetworkStartPosition")]
public class NetworkStartPosition : MonoBehaviour
{
public void Awake()
{
NetworkManager.RegisterStartPosition(transform);
}
public void OnDestroy()
{
NetworkManager.UnRegisterStartPosition(transform);
}
}
}
#endif