using System;
using UnityEngine;

namespace FastArena.Network
{
    public class GameObjectId : MonoBehaviour
    {
        public int Id { get; private set; } = -1;

        internal void _SetId(int packetGameObjectId)
        {
            if (Id != -1)
                throw new Exception($"GameObjectId is already set to {Id}");
            Id = packetGameObjectId;
        }
    }
}