Files
2026-06-22 16:18:34 +02:00

29 lines
926 B
C#

using UnityEngine;
namespace Ashwild.Network
{
/// <summary>
/// Marks a position in the game scene where a networked player can be spawned.
/// Place one (or several) in the game scene; NetworkSessionManager picks them round-robin.
/// </summary>
[DisallowMultipleComponent]
public class PlayerSpawnPoint : MonoBehaviour
{
#region Gizmos
/// <summary>
/// Draws a capsule-like marker in the editor so spawn points are easy to position.
/// </summary>
private void OnDrawGizmos()
{
Gizmos.color = new Color(0.2f, 0.8f, 1f, 0.6f);
Vector3 center = transform.position + Vector3.up;
Gizmos.DrawWireSphere(center, 0.4f);
Gizmos.DrawLine(transform.position, center + Vector3.up);
Gizmos.DrawRay(transform.position + Vector3.up, transform.forward * 0.8f);
}
#endregion
}
}