using UnityEngine; namespace QSB.WorldSync { public abstract class WorldObject : IWorldObject where T : MonoBehaviour { public int ObjectId { get; protected set; } public T AttachedObject { get; protected set; } public string Name => AttachedObject == null ? "" : AttachedObject.name; public abstract void Init(T attachedObject, int id); public virtual void OnRemoval() { } public MonoBehaviour ReturnObject() => AttachedObject; } }