Beispiel #1
0
    internal void CreatePrimaryEntity(UnityObject uobject)
    {
        var entity = CreateEntity(uobject, 0);

        int index = m_Entities.Alloc();

        m_Entities.Data[index] = entity;

        if (!m_GameObjectToEntity.TryAdd(uobject.GetInstanceID(), index))
        {
            throw new InvalidOperationException();
        }
    }