static PlayerLoopSystem[] InsertSystem <T>(World world, PlayerLoopSystem[] oldArray, int insertIndex)
            where T : ComponentSystemBase
        {
            T system = world.GetExistingSystem <T>();

            if (system == null)
            {
                return(oldArray);
            }

            var newArray = new PlayerLoopSystem[oldArray.Length + 1];

            int o = 0;

            for (int n = 0; n < newArray.Length; ++n)
            {
                if (n == insertIndex)
                {
                    continue;
                }

                newArray[n] = oldArray[o];
                ++o;
            }
            ScriptBehaviourUpdateOrder.InsertManagerIntoSubsystemList <T>(newArray, insertIndex, world.GetOrCreateSystem <T>());

            return(newArray);
        }