protected void FixedUpdate()
        {
            BeginFrame();

            float deltaTime = Time.fixedDeltaTime;

            for (int iBehaviour = 0; iBehaviour < m_BehavioursForTraverse.Count; iBehaviour++)
            {
                BaseBehaviour iterBehaviour = m_BehavioursForTraverse[iBehaviour];
                if (!iterBehaviour.CanUpdate())
                {
                    continue;
                }

                try
                {
                    MDebug.LogVerbose("Core"
                                      , $"Before execute {iterBehaviour.GetName()}.OnFixedUpdate");

                    iterBehaviour.OnFixedUpdate(deltaTime);

                    MDebug.LogVerbose("Core"
                                      , $"After execute {iterBehaviour.GetName()}.OnFixedUpdate");
                }
                catch (Exception e)
                {
                    MDebug.LogError("Core"
                                    , $"Execute {iterBehaviour.GetName()}.OnFixedUpdate Exception:{e.ToString()}");
                }
            }
        }
        private void ParallelUpdate(float deltaTime)
        {
            MDebug.Assert(m_ParallelItemsCache.Count == 0, "Core", "m_ParallelTasksCache.Count == 0");

            string lastGroupName = string.Empty;

            for (int iBehaviour = 0; iBehaviour < m_BehavioursForTraverse.Count; iBehaviour++)
            {
                BaseBehaviour iterBehaviour = m_BehavioursForTraverse[iBehaviour];
                if (!iterBehaviour.CanUpdate() ||
                    !iterBehaviour.HasFeature(FeatureFlag.ParallelUpdate))
                {
                    continue;
                }

                string groupName = iterBehaviour.GetGroup();
                if (groupName != lastGroupName)
                {
                    ExecuteParallelUpdateGroup();
                }

                lastGroupName = groupName;
                m_ParallelItemsCache.Add(m_ParallelItemPool.Alloc()
                                         .SetData(iterBehaviour, deltaTime));
            }

            ExecuteParallelUpdateGroup();
        }
        protected void Update()
        {
            // 这里也要调用一次的原因是,当前帧可能没执行FixedUpdate
            BeginFrame();

            float deltaTime  = Time.deltaTime;
            int   frameCount = Time.frameCount;

            ParallelUpdate(deltaTime);

            for (int iBehaviour = 0; iBehaviour < m_BehavioursForTraverse.Count; iBehaviour++)
            {
                BaseBehaviour iterBehaviour = m_BehavioursForTraverse[iBehaviour];
                if (!iterBehaviour.CanUpdate())
                {
                    continue;
                }

                float behaviourDeltaTime;
                if (iterBehaviour.HasFeature(FeatureFlag.UpdateFrequency))
                {
                    try
                    {
                        if (!iterBehaviour.ControlUpdateFrequency(out behaviourDeltaTime, deltaTime, frameCount))
                        {
                            continue;
                        }
                    }
                    catch (Exception e)
                    {
                        MDebug.LogError("Core"
                                        , $"Execute {iterBehaviour.GetName()}.ControlUpdateFrequency Exception:{e.ToString()}");
                        continue;
                    }
                }
                else
                {
                    behaviourDeltaTime = deltaTime;
                }

                try
                {
                    MDebug.LogVerbose("Core"
                                      , $"Before execute {iterBehaviour.GetName()}.OnUpdate");

                    iterBehaviour.OnUpdate(behaviourDeltaTime);

                    MDebug.LogVerbose("Core"
                                      , $"After execute {iterBehaviour.GetName()}.OnUpdate");
                }
                catch (Exception e)
                {
                    MDebug.LogError("Core"
                                    , $"Execute {iterBehaviour.GetName()}.OnUpdate Exception:{e.ToString()}");
                }
            }
        }
        private void TaskUpdate(float deltaTime)
        {
            MDebug.Assert(m_TaskItemsCache.Count == 0, "Core", "m_TaskItemsCache.Count == 0");

            for (int iBehaviour = 0; iBehaviour < m_BehavioursForTraverse.Count; iBehaviour++)
            {
                BaseBehaviour iterBehaviour = m_BehavioursForTraverse[iBehaviour];
                if (!iterBehaviour.CanUpdate() ||
                    !iterBehaviour.HasFeature(FeatureFlag.TaskUpdate))
                {
                    continue;
                }

                TaskUpdateItem iterTaskItem = m_TaskItemPool.Alloc()
                                              .SetData(iterBehaviour, deltaTime);
                m_TaskItemsCache.Add(iterTaskItem);

                try
                {
                    MDebug.LogVerbose("Core"
                                      , $"Before execute {iterBehaviour.GetName()}.OnBeforeTastUpdate");

                    iterTaskItem.Input = iterBehaviour.OnBeforeTastUpdate();

                    MDebug.LogVerbose("Core"
                                      , $"After execute {iterBehaviour.GetName()}.OnBeforeTastUpdate");
                }
                catch (Exception e)
                {
                    MDebug.LogError("Core"
                                    , $"Execute {iterBehaviour.GetName()}.OnBeforeTastUpdate Exception:{e.ToString()}");
                }

                System.Threading.ThreadPool.QueueUserWorkItem(iterBehaviour.DoTaskUpdate_Thread, iterTaskItem);
            }
        }