示例#1
0
 void OnDebugStateDataChanged(UIDebugStateData data)
 {
     if (m_CachedDebugOptions != data.debugOptionsData)
     {
         m_CachedDebugOptions = data.debugOptionsData;
     }
 }
        void OnDebugStateChanged(UIDebugStateData data)
        {
            if (m_CurrentsDebugOptionsData == data.debugOptionsData)
            {
                return;
            }

            m_GesturesTrackingToggle.on = data.debugOptionsData.gesturesTrackingEnabled;

            m_ARAxisTrackingToggle.on = data.debugOptionsData.ARAxisTrackingEnabled;

            m_CurrentsDebugOptionsData = data.debugOptionsData;
        }
示例#3
0
        void OnDebugStateDataChanged(UIDebugStateData data)
        {
            if (!m_DialogWindow.open)
            {
                return;
            }

            if (m_CurrentStatsInfoData != data.statsInfoData)
            {
                if (m_CurrentStatsInfoData.fpsMax != data.statsInfoData.fpsMax)
                {
                    m_FpsMaxText.text  = k_StringDisplayCache[data.statsInfoData.fpsMax];
                    m_FpsMaxText.color = m_ColorGradient.Evaluate((float)data.statsInfoData.fpsMax / m_TargetFrameRate);
                }
                if (m_CurrentStatsInfoData.fpsAvg != data.statsInfoData.fpsAvg)
                {
                    m_FpsAvgText.text  = k_StringDisplayCache[data.statsInfoData.fpsAvg];
                    m_FpsAvgText.color = m_ColorGradient.Evaluate((float)data.statsInfoData.fpsAvg / m_TargetFrameRate);
                }
                if (m_CurrentStatsInfoData.fpsMin != data.statsInfoData.fpsMin)
                {
                    m_FpsMinText.text  = k_StringDisplayCache[data.statsInfoData.fpsMin];
                    m_FpsMinText.color = m_ColorGradient.Evaluate((float)data.statsInfoData.fpsMin / m_TargetFrameRate);
                }

                if (m_CurrentStatsInfoData.assetsCountData != data.statsInfoData.assetsCountData)
                {
                    m_AssetsAddedText.text   = data.statsInfoData.assetsCountData.addedCount.ToString();
                    m_AssetsChangedText.text = data.statsInfoData.assetsCountData.changedCount.ToString();
                    m_AssetsRemovedText.text = data.statsInfoData.assetsCountData.removedCount.ToString();
                }

                if (m_CurrentStatsInfoData.instancesCountData != data.statsInfoData.instancesCountData)
                {
                    m_InstancesAddedText.text   = data.statsInfoData.instancesCountData.addedCount.ToString();
                    m_InstancesChangedText.text = data.statsInfoData.instancesCountData.changedCount.ToString();
                    m_InstancesRemovedText.text = data.statsInfoData.instancesCountData.removedCount.ToString();
                }

                if (m_CurrentStatsInfoData.gameObjectsCountData != data.statsInfoData.gameObjectsCountData)
                {
                    m_GameObjectsAddedText.text   = data.statsInfoData.gameObjectsCountData.addedCount.ToString();
                    m_GameObjectsChangedText.text = data.statsInfoData.gameObjectsCountData.changedCount.ToString();
                    m_GameObjectsRemovedText.text = data.statsInfoData.gameObjectsCountData.removedCount.ToString();
                }

                m_CurrentStatsInfoData = data.statsInfoData;
            }
        }
示例#4
0
        void OnDebugStateChanged(UIDebugStateData data)
        {
            if (m_CurrentsDebugOptionsData == data.debugOptionsData)
            {
                return;
            }

            m_GesturesTrackingToggle.on = data.debugOptionsData.gesturesTrackingEnabled;
            m_ARAxisTrackingToggle.on   = data.debugOptionsData.ARAxisTrackingEnabled;

            m_DebugBoundingBoxMaterialToggle.on = data.debugOptionsData.useDebugBoundingBoxMaterials;
            m_CullingToggle.on        = data.debugOptionsData.useCulling;
            m_StaticBatchingToggle.on = data.debugOptionsData.useStaticBatching;

            m_AnglePrioritySlider.SetValue(data.debugOptionsData.spatialPriorityWeights.x);
            m_DistancePrioritySlider.SetValue(data.debugOptionsData.spatialPriorityWeights.y);
            m_SizePrioritySlider.SetValue(data.debugOptionsData.spatialPriorityWeights.z);

            m_CurrentsDebugOptionsData = data.debugOptionsData;
        }