Esempio n. 1
0
        /// <summary>
        ///     Register a system
        /// </summary>
        /// <param name="system"></param>
        /// <typeparam name="T"></typeparam>
        public void RegisterSystem <T>(T system)
        {
            if (!m_IsDynamicSystemId && !m_IsAddingToFixedCollection)
            {
                if (!IdToSystems.ContainsValue(system))
                {
                    Debug.LogError($"We couldn't add {system} since it use a fixed system list.");
                    return;
                }
            }

            var id = (uint)IdToSystems.Count;

            IdToSystems.Add(id, system);
            SystemsToId.Add(system, id);
        }