GameFramework 学习

摘要:
https://gameframework.cn/ConfigDataNodeDataTableDebuggerDownloadEntityEventFSMLocalizationNetworkObjectPoolProcedureReferencePoolResourceSceneSettingSoundUIWebRequestConfigDataNodeDataTableDebuggerMax

https://gameframework.cn/

Config

DataNode

DataTable

Debugger

Download

Entity

Event

FSM

Localization

Network

ObjectPool

Procedure

ReferencePool

Resource

Scene

Setting

Sound

UI

WebRequest

Config

DataNode

DataTable

Debugger

Max Line:1000条Log信息的情况下 (浮动)

GameFramework 学习第1张

ConsoleWindow

Application.logMessageReceived

SystemInfoWindow

                    DrawItem("Device Unique ID", SystemInfo.deviceUniqueIdentifier);
                    DrawItem("Device Name", SystemInfo.deviceName);
                    DrawItem("Device Type", SystemInfo.deviceType.ToString());
                    DrawItem("Device Model", SystemInfo.deviceModel);
                    DrawItem("Processor Type", SystemInfo.processorType);
                    DrawItem("Processor Count", SystemInfo.processorCount.ToString());
                    DrawItem("Processor Frequency", Utility.Text.Format("{0} MHz", SystemInfo.processorFrequency.ToString()));
                    DrawItem("System Memory Size", Utility.Text.Format("{0} MB", SystemInfo.systemMemorySize.ToString()));
#if UNITY_5_5_OR_NEWERDrawItem("Operating System Family", SystemInfo.operatingSystemFamily.ToString());
#endifDrawItem("Operating System", SystemInfo.operatingSystem);
#if UNITY_5_6_OR_NEWERDrawItem("Battery Status", SystemInfo.batteryStatus.ToString());
                    DrawItem("Battery Level", GetBatteryLevelString(SystemInfo.batteryLevel));
#endif
#if UNITY_5_4_OR_NEWERDrawItem("Supports Audio", SystemInfo.supportsAudio.ToString());
#endifDrawItem("Supports Location Service", SystemInfo.supportsLocationService.ToString());
                    DrawItem("Supports Accelerometer", SystemInfo.supportsAccelerometer.ToString());
                    DrawItem("Supports Gyroscope", SystemInfo.supportsGyroscope.ToString());
                    DrawItem("Supports Vibration", SystemInfo.supportsVibration.ToString());
                    DrawItem("Genuine", Application.genuine.ToString());
                    DrawItem("Genuine Check Available", Application.genuineCheckAvailable.ToString());
SystemInfoWindow

EnvironmentInformationWindow

                    DrawItem("Product Name", Application.productName);
                    DrawItem("Company Name", Application.companyName);
#if UNITY_5_6_OR_NEWERDrawItem("Game Identifier", Application.identifier);
#elseDrawItem("Game Identifier", Application.bundleIdentifier);
#endifDrawItem("Application Version", Application.version);
                    DrawItem("Unity Version", Application.unityVersion);
                    DrawItem("Platform", Application.platform.ToString());
                    DrawItem("System Language", Application.systemLanguage.ToString());
                    DrawItem("Cloud Project Id", Application.cloudProjectId);
#if UNITY_5_6_OR_NEWERDrawItem("Build Guid", Application.buildGUID);
#endifDrawItem("Target Frame Rate", Application.targetFrameRate.ToString());
                    DrawItem("Internet Reachability", Application.internetReachability.ToString());
                    DrawItem("Background Loading Priority", Application.backgroundLoadingPriority.ToString());
                    DrawItem("Is Playing", Application.isPlaying.ToString());
#if UNITY_5_5_OR_NEWERDrawItem("Splash Screen Is Finished", SplashScreen.isFinished.ToString());
#elseDrawItem("Is Showing Splash Screen", Application.isShowingSplashScreen.ToString());
#endifDrawItem("Run In Background", Application.runInBackground.ToString());
#if UNITY_5_5_OR_NEWERDrawItem("Install Name", Application.installerName);
#endifDrawItem("Install Mode", Application.installMode.ToString());
                    DrawItem("Sandbox Type", Application.sandboxType.ToString());
                    DrawItem("Is Mobile Platform", Application.isMobilePlatform.ToString());
                    DrawItem("Is Console Platform", Application.isConsolePlatform.ToString());
                    DrawItem("Is Editor", Application.isEditor.ToString());
#if UNITY_5_6_OR_NEWERDrawItem("Is Focused", Application.isFocused.ToString());
#endif
#if UNITY_2018_2_OR_NEWERDrawItem("Is Batch Mode", Application.isBatchMode.ToString());
#endif
#if UNITY_5_3DrawItem("Stack Trace Log Type", Application.stackTraceLogType.ToString());
#endif}
EnvironmentInformationWindow

ScreenInformationWindow

                    DrawItem("Current Resolution", GetResolutionString(Screen.currentResolution));
                    DrawItem("Screen Width", Utility.Text.Format("{0} px / {1} in / {2} cm", Screen.width.ToString(), Utility.Converter.GetInchesFromPixels(Screen.width).ToString("F2"), Utility.Converter.GetCentimetersFromPixels(Screen.width).ToString("F2")));
                    DrawItem("Screen Height", Utility.Text.Format("{0} px / {1} in / {2} cm", Screen.height.ToString(), Utility.Converter.GetInchesFromPixels(Screen.height).ToString("F2"), Utility.Converter.GetCentimetersFromPixels(Screen.height).ToString("F2")));
                    DrawItem("Screen DPI", Screen.dpi.ToString("F2"));
                    DrawItem("Screen Orientation", Screen.orientation.ToString());
                    DrawItem("Is Full Screen", Screen.fullScreen.ToString());
#if UNITY_2018_1_OR_NEWERDrawItem("Full Screen Mode", Screen.fullScreenMode.ToString());
#endifDrawItem("Sleep Timeout", GetSleepTimeoutDescription(Screen.sleepTimeout));
                    DrawItem("Cursor Visible", Cursor.visible.ToString());
                    DrawItem("Cursor Lock State", Cursor.lockState.ToString());
                    DrawItem("Auto Landscape Left", Screen.autorotateToLandscapeLeft.ToString());
                    DrawItem("Auto Landscape Right", Screen.autorotateToLandscapeRight.ToString());
                    DrawItem("Auto Portrait", Screen.autorotateToPortrait.ToString());
                    DrawItem("Auto Portrait Upside Down", Screen.autorotateToPortraitUpsideDown.ToString());
#if UNITY_2017_2_OR_NEWER && !UNITY_2017_2_0DrawItem("Safe Area", Screen.safeArea.ToString());
#endifDrawItem("Support Resolutions", GetResolutionsString(Screen.resolutions));
ScreenInformationWindow

GraphicsInformationWindow

                    DrawItem("Device ID", SystemInfo.graphicsDeviceID.ToString());
                    DrawItem("Device Name", SystemInfo.graphicsDeviceName);
                    DrawItem("Device Vendor ID", SystemInfo.graphicsDeviceVendorID.ToString());
                    DrawItem("Device Vendor", SystemInfo.graphicsDeviceVendor);
                    DrawItem("Device Type", SystemInfo.graphicsDeviceType.ToString());
                    DrawItem("Device Version", SystemInfo.graphicsDeviceVersion);
                    DrawItem("Memory Size", Utility.Text.Format("{0} MB", SystemInfo.graphicsMemorySize.ToString()));
                    DrawItem("Multi Threaded", SystemInfo.graphicsMultiThreaded.ToString());
                    DrawItem("Shader Level", GetShaderLevelString(SystemInfo.graphicsShaderLevel));
                    DrawItem("Global Maximum LOD", Shader.globalMaximumLOD.ToString());
#if UNITY_5_5_OR_NEWERDrawItem("Active Tier", Graphics.activeTier.ToString());
#endif
#if UNITY_2017_2_OR_NEWERDrawItem("Active Color Gamut", Graphics.activeColorGamut.ToString());
#endifDrawItem("NPOT Support", SystemInfo.npotSupport.ToString());
                    DrawItem("Max Texture Size", SystemInfo.maxTextureSize.ToString());
                    DrawItem("Supported Render Target Count", SystemInfo.supportedRenderTargetCount.ToString());
#if UNITY_5_4_OR_NEWERDrawItem("Copy Texture Support", SystemInfo.copyTextureSupport.ToString());
#endif
#if UNITY_5_5_OR_NEWERDrawItem("Uses Reversed ZBuffer", SystemInfo.usesReversedZBuffer.ToString());
#endif
#if UNITY_5_6_OR_NEWERDrawItem("Max Cubemap Size", SystemInfo.maxCubemapSize.ToString());
                    DrawItem("Graphics UV Starts At Top", SystemInfo.graphicsUVStartsAtTop.ToString());
#endif
#if UNITY_2019_1_OR_NEWERDrawItem("Min Constant Buffer Offset Alignment", SystemInfo.minConstantBufferOffsetAlignment.ToString());
#endif
#if UNITY_2018_3_OR_NEWERDrawItem("Has Hidden Surface Removal On GPU", SystemInfo.hasHiddenSurfaceRemovalOnGPU.ToString());
                    DrawItem("Has Dynamic Uniform Array Indexing In Fragment Shaders", SystemInfo.hasDynamicUniformArrayIndexingInFragmentShaders.ToString());
#endif
#if UNITY_5_3 || UNITY_5_4DrawItem("Supports Stencil", SystemInfo.supportsStencil.ToString());
                    DrawItem("Supports Render Textures", SystemInfo.supportsRenderTextures.ToString());
#endifDrawItem("Supports Sparse Textures", SystemInfo.supportsSparseTextures.ToString());
                    DrawItem("Supports 3D Textures", SystemInfo.supports3DTextures.ToString());
                    DrawItem("Supports Shadows", SystemInfo.supportsShadows.ToString());
                    DrawItem("Supports Raw Shadow Depth Sampling", SystemInfo.supportsRawShadowDepthSampling.ToString());
#if !UNITY_2019_1_OR_NEWERDrawItem("Supports Render To Cubemap", SystemInfo.supportsRenderToCubemap.ToString());
#endifDrawItem("Supports Compute Shader", SystemInfo.supportsComputeShaders.ToString());
                    DrawItem("Supports Instancing", SystemInfo.supportsInstancing.ToString());
#if !UNITY_2019_1_OR_NEWERDrawItem("Supports Image Effects", SystemInfo.supportsImageEffects.ToString());
#endif
#if UNITY_5_4_OR_NEWERDrawItem("Supports 2D Array Textures", SystemInfo.supports2DArrayTextures.ToString());
                    DrawItem("Supports Motion Vectors", SystemInfo.supportsMotionVectors.ToString());
#endif
#if UNITY_5_5_OR_NEWERDrawItem("Supports Cubemap Array Textures", SystemInfo.supportsCubemapArrayTextures.ToString());
#endif
#if UNITY_5_6_OR_NEWERDrawItem("Supports 3D Render Textures", SystemInfo.supports3DRenderTextures.ToString());
#endif
#if UNITY_2017_2_OR_NEWER && !UNITY_2017_2_0 || UNITY_2017_1_4DrawItem("Supports Texture Wrap Mirror Once", SystemInfo.supportsTextureWrapMirrorOnce.ToString());
#endif
#if UNITY_2019_1_OR_NEWERDrawItem("Supports Graphics Fence", SystemInfo.supportsGraphicsFence.ToString());
#elif UNITY_2017_3_OR_NEWERDrawItem("Supports GPU Fence", SystemInfo.supportsGPUFence.ToString());
#endif
#if UNITY_2017_3_OR_NEWERDrawItem("Supports Async Compute", SystemInfo.supportsAsyncCompute.ToString());
                    DrawItem("Supports Multisampled Textures", SystemInfo.supportsMultisampledTextures.ToString());
#endif
#if UNITY_2018_1_OR_NEWERDrawItem("Supports Async GPU Readback", SystemInfo.supportsAsyncGPUReadback.ToString());
                    DrawItem("Supports 32bits Index Buffer", SystemInfo.supports32bitsIndexBuffer.ToString());
                    DrawItem("Supports Hardware Quad Topology", SystemInfo.supportsHardwareQuadTopology.ToString());
#endif
#if UNITY_2018_2_OR_NEWERDrawItem("Supports Mip Streaming", SystemInfo.supportsMipStreaming.ToString());
                    DrawItem("Supports Multisample Auto Resolve", SystemInfo.supportsMultisampleAutoResolve.ToString());
#endif
#if UNITY_2018_3_OR_NEWERDrawItem("Supports Separated Render Targets Blend", SystemInfo.supportsSeparatedRenderTargetsBlend.ToString());
#endif
#if UNITY_2019_1_OR_NEWERDrawItem("Supports Set Constant Buffer", SystemInfo.supportsSetConstantBuffer.ToString());
#endif
GraphicsInformationWindow

InputSummaryInformationWindow

                    DrawItem("Back Button Leaves App", Input.backButtonLeavesApp.ToString());
                    DrawItem("Device Orientation", Input.deviceOrientation.ToString());
                    DrawItem("Mouse Present", Input.mousePresent.ToString());
                    DrawItem("Mouse Position", Input.mousePosition.ToString());
                    DrawItem("Mouse Scroll Delta", Input.mouseScrollDelta.ToString());
                    DrawItem("Any Key", Input.anyKey.ToString());
                    DrawItem("Any Key Down", Input.anyKeyDown.ToString());
                    DrawItem("Input String", Input.inputString);
                    DrawItem("IME Is Selected", Input.imeIsSelected.ToString());
                    DrawItem("IME Composition Mode", Input.imeCompositionMode.ToString());
                    DrawItem("Compensate Sensors", Input.compensateSensors.ToString());
                    DrawItem("Composition Cursor Position", Input.compositionCursorPos.ToString());
                    DrawItem("Composition String", Input.compositionString);
InputSummaryInformationWindow

InputTouchInformationWindow

                    DrawItem("Touch Supported", Input.touchSupported.ToString());
                    DrawItem("Touch Pressure Supported", Input.touchPressureSupported.ToString());
                    DrawItem("Stylus Touch Supported", Input.stylusTouchSupported.ToString());
                    DrawItem("Simulate Mouse With Touches", Input.simulateMouseWithTouches.ToString());
                    DrawItem("Multi Touch Enabled", Input.multiTouchEnabled.ToString());
                    DrawItem("Touch Count", Input.touchCount.ToString());
                    DrawItem("Touches", GetTouchesString(Input.touches));
InputTouchInformationWindow

InputLocationInformationWindow

   GUILayout.BeginVertical("box");
                {
                    GUILayout.BeginHorizontal();
                    {
                        if (GUILayout.Button("Enable", GUILayout.Height(30f)))
                        {
                            Input.location.Start();
                        }
                        if (GUILayout.Button("Disable", GUILayout.Height(30f)))
                        {
                            Input.location.Stop();
                        }
                    }
                    GUILayout.EndHorizontal();

                    DrawItem("Is Enabled By User", Input.location.isEnabledByUser.ToString());
                    DrawItem("Status", Input.location.status.ToString());
                    if (Input.location.status ==LocationServiceStatus.Running)
                    {
                        DrawItem("Horizontal Accuracy", Input.location.lastData.horizontalAccuracy.ToString());
                        DrawItem("Vertical Accuracy", Input.location.lastData.verticalAccuracy.ToString());
                        DrawItem("Longitude", Input.location.lastData.longitude.ToString());
                        DrawItem("Latitude", Input.location.lastData.latitude.ToString());
                        DrawItem("Altitude", Input.location.lastData.altitude.ToString());
                        DrawItem("Timestamp", Input.location.lastData.timestamp.ToString());
                    }
                }
                GUILayout.EndVertical();
            }
InputLocationInformationWindow

InputAccelerationInformationWindow

                    DrawItem("Acceleration", Input.acceleration.ToString());
                    DrawItem("Acceleration Event Count", Input.accelerationEventCount.ToString());
                    DrawItem("Acceleration Events", GetAccelerationEventsString(Input.accelerationEvents));
InputAccelerationInformationWindow

InputGyroscopeInformationWindow

                GUILayout.BeginVertical("box");
                {
                    GUILayout.BeginHorizontal();
                    {
                        if (GUILayout.Button("Enable", GUILayout.Height(30f)))
                        {
                            Input.gyro.enabled = true;
                        }
                        if (GUILayout.Button("Disable", GUILayout.Height(30f)))
                        {
                            Input.gyro.enabled = false;
                        }
                    }
                    GUILayout.EndHorizontal();

                    DrawItem("Enabled", Input.gyro.enabled.ToString());
                    if(Input.gyro.enabled)
                    {
                        DrawItem("Update Interval", Input.gyro.updateInterval.ToString());
                        DrawItem("Attitude", Input.gyro.attitude.eulerAngles.ToString());
                        DrawItem("Gravity", Input.gyro.gravity.ToString());
                        DrawItem("Rotation Rate", Input.gyro.rotationRate.ToString());
                        DrawItem("Rotation Rate Unbiased", Input.gyro.rotationRateUnbiased.ToString());
                        DrawItem("User Acceleration", Input.gyro.userAcceleration.ToString());
                    }
                }
                GUILayout.EndVertical();
InputGyroscopeInformationWindow

InputCompassInformationWindow

                GUILayout.BeginVertical("box");
                {
                    GUILayout.BeginHorizontal();
                    {
                        if (GUILayout.Button("Enable", GUILayout.Height(30f)))
                        {
                            Input.compass.enabled = true;
                        }
                        if (GUILayout.Button("Disable", GUILayout.Height(30f)))
                        {
                            Input.compass.enabled = false;
                        }
                    }
                    GUILayout.EndHorizontal();

                    DrawItem("Enabled", Input.compass.enabled.ToString());
                    if(Input.compass.enabled)
                    {
                        DrawItem("Heading Accuracy", Input.compass.headingAccuracy.ToString());
                        DrawItem("Magnetic Heading", Input.compass.magneticHeading.ToString());
                        DrawItem("Raw Vector", Input.compass.rawVector.ToString());
                        DrawItem("Timestamp", Input.compass.timestamp.ToString());
                        DrawItem("True Heading", Input.compass.trueHeading.ToString());
                    }
                }
                GUILayout.EndVertical();
InputCompassInformationWindow

PathInformationWindow

                    DrawItem("Data Path", Application.dataPath);
                    DrawItem("Persistent Data Path", Application.persistentDataPath);
                    DrawItem("Streaming Assets Path", Application.streamingAssetsPath);
                    DrawItem("Temporary Cache Path", Application.temporaryCachePath);
#if UNITY_2018_3_OR_NEWERDrawItem("Console Log Path", Application.consoleLogPath);
#endif
PathInformationWindow

SceneInformationWindow

                    DrawItem("Scene Count", SceneManager.sceneCount.ToString());
                    DrawItem("Scene Count In Build Settings", SceneManager.sceneCountInBuildSettings.ToString());

                    Scene activeScene =SceneManager.GetActiveScene();
                    DrawItem("Active Scene Name", activeScene.name);
                    DrawItem("Active Scene Path", activeScene.path);
                    DrawItem("Active Scene Build Index", activeScene.buildIndex.ToString());
                    DrawItem("Active Scene Is Dirty", activeScene.isDirty.ToString());
                    DrawItem("Active Scene Is Loaded", activeScene.isLoaded.ToString());
                    DrawItem("Active Scene Is Valid", activeScene.IsValid().ToString());
                    DrawItem("Active Scene Root Count", activeScene.rootCount.ToString());
SceneInformationWindow

TimeInformationWindow

                    DrawItem("Time Scale", Utility.Text.Format("{0} [{1}]", Time.timeScale.ToString(), GetTimeScaleDescription(Time.timeScale)));
                    DrawItem("Realtime Since Startup", Time.realtimeSinceStartup.ToString());
                    DrawItem("Time Since Level Load", Time.timeSinceLevelLoad.ToString());
                    DrawItem("Time", Time.time.ToString());
                    DrawItem("Fixed Time", Time.fixedTime.ToString());
                    DrawItem("Unscaled Time", Time.unscaledTime.ToString());
#if UNITY_5_6_OR_NEWERDrawItem("Fixed Unscaled Time", Time.fixedUnscaledTime.ToString());
#endifDrawItem("Delta Time", Time.deltaTime.ToString());
                    DrawItem("Fixed Delta Time", Time.fixedDeltaTime.ToString());
                    DrawItem("Unscaled Delta Time", Time.unscaledDeltaTime.ToString());
#if UNITY_5_6_OR_NEWERDrawItem("Fixed Unscaled Delta Time", Time.fixedUnscaledDeltaTime.ToString());
#endifDrawItem("Smooth Delta Time", Time.smoothDeltaTime.ToString());
                    DrawItem("Maximum Delta Time", Time.maximumDeltaTime.ToString());
#if UNITY_5_5_OR_NEWERDrawItem("Maximum Particle Delta Time", Time.maximumParticleDeltaTime.ToString());
#endifDrawItem("Frame Count", Time.frameCount.ToString());
                    DrawItem("Rendered Frame Count", Time.renderedFrameCount.ToString());
                    DrawItem("Capture Framerate", Time.captureFramerate.ToString());
#if UNITY_5_6_OR_NEWERDrawItem("In Fixed Time Step", Time.inFixedTimeStep.ToString());
#endif
TimeInformationWindow

QualityInformationWindow

                GUILayout.Label("<b>Quality Level</b>");
                GUILayout.BeginVertical("box");
                {
                    int currentQualityLevel =QualitySettings.GetQualityLevel();

                    DrawItem("Current Quality Level", QualitySettings.names[currentQualityLevel]);
                    m_ApplyExpensiveChanges = GUILayout.Toggle(m_ApplyExpensiveChanges, "Apply expensive changes on quality level change.");

                    int newQualityLevel = GUILayout.SelectionGrid(currentQualityLevel, QualitySettings.names, 3, "toggle");
                    if (newQualityLevel !=currentQualityLevel)
                    {
                        QualitySettings.SetQualityLevel(newQualityLevel, m_ApplyExpensiveChanges);
                    }
                }
                GUILayout.EndVertical();

                GUILayout.Label("<b>Rendering Information</b>");
                GUILayout.BeginVertical("box");
                {
                    DrawItem("Active Color Space", QualitySettings.activeColorSpace.ToString());
                    DrawItem("Desired Color Space", QualitySettings.desiredColorSpace.ToString());
                    DrawItem("Max Queued Frames", QualitySettings.maxQueuedFrames.ToString());
                    DrawItem("Pixel Light Count", QualitySettings.pixelLightCount.ToString());
                    DrawItem("Master Texture Limit", QualitySettings.masterTextureLimit.ToString());
                    DrawItem("Anisotropic Filtering", QualitySettings.anisotropicFiltering.ToString());
                    DrawItem("Anti Aliasing", QualitySettings.antiAliasing.ToString());
#if UNITY_5_5_OR_NEWERDrawItem("Soft Particles", QualitySettings.softParticles.ToString());
#endifDrawItem("Soft Vegetation", QualitySettings.softVegetation.ToString());
                    DrawItem("Realtime Reflection Probes", QualitySettings.realtimeReflectionProbes.ToString());
                    DrawItem("Billboards Face Camera Position", QualitySettings.billboardsFaceCameraPosition.ToString());
#if UNITY_2017_1_OR_NEWERDrawItem("Resolution Scaling Fixed DPI Factor", QualitySettings.resolutionScalingFixedDPIFactor.ToString());
#endif
#if UNITY_2018_2_OR_NEWERDrawItem("Texture Streaming Enabled", QualitySettings.streamingMipmapsActive.ToString());
                    DrawItem("Texture Streaming Add All Cameras", QualitySettings.streamingMipmapsAddAllCameras.ToString());
                    DrawItem("Texture Streaming Memory Budget", QualitySettings.streamingMipmapsMemoryBudget.ToString());
                    DrawItem("Texture Streaming Renderers Per Frame", QualitySettings.streamingMipmapsRenderersPerFrame.ToString());
                    DrawItem("Texture Streaming Max Level Reduction", QualitySettings.streamingMipmapsMaxLevelReduction.ToString());
                    DrawItem("Texture Streaming Max File IO Requests", QualitySettings.streamingMipmapsMaxFileIORequests.ToString());
#endif}
                GUILayout.EndVertical();

                GUILayout.Label("<b>Shadows Information</b>");
                GUILayout.BeginVertical("box");
                {
#if UNITY_2017_1_OR_NEWERDrawItem("Shadowmask Mode", QualitySettings.shadowmaskMode.ToString());
#endif
#if UNITY_5_5_OR_NEWERDrawItem("Shadow Quality", QualitySettings.shadows.ToString());
#endif
#if UNITY_5_4_OR_NEWERDrawItem("Shadow Resolution", QualitySettings.shadowResolution.ToString());
#endifDrawItem("Shadow Projection", QualitySettings.shadowProjection.ToString());
                    DrawItem("Shadow Distance", QualitySettings.shadowDistance.ToString());
                    DrawItem("Shadow Near Plane Offset", QualitySettings.shadowNearPlaneOffset.ToString());
                    DrawItem("Shadow Cascades", QualitySettings.shadowCascades.ToString());
                    DrawItem("Shadow Cascade 2 Split", QualitySettings.shadowCascade2Split.ToString());
                    DrawItem("Shadow Cascade 4 Split", QualitySettings.shadowCascade4Split.ToString());
                }
                GUILayout.EndVertical();

                GUILayout.Label("<b>Other Information</b>");
                GUILayout.BeginVertical("box");
                {
#if UNITY_2019_1_OR_NEWERDrawItem("Skin Weights", QualitySettings.skinWeights.ToString());
#elseDrawItem("Blend Weights", QualitySettings.blendWeights.ToString());
#endifDrawItem("VSync Count", QualitySettings.vSyncCount.ToString());
                    DrawItem("LOD Bias", QualitySettings.lodBias.ToString());
                    DrawItem("Maximum LOD Level", QualitySettings.maximumLODLevel.ToString());
                    DrawItem("Particle Raycast Budget", QualitySettings.particleRaycastBudget.ToString());
                    DrawItem("Async Upload Time Slice", Utility.Text.Format("{0} ms", QualitySettings.asyncUploadTimeSlice.ToString()));
                    DrawItem("Async Upload Buffer Size", Utility.Text.Format("{0} MB", QualitySettings.asyncUploadBufferSize.ToString()));
#if UNITY_2018_3_OR_NEWERDrawItem("Async Upload Persistent Buffer", QualitySettings.asyncUploadPersistentBuffer.ToString());
#endif}
                GUILayout.EndVertical();
QualityInformationWindow

WebPlayerInformationWindow

#if !UNITY_2017_2_OR_NEWERDrawItem("Is Web Player", Application.isWebPlayer.ToString());
#endifDrawItem("Absolute URL", Application.absoluteURL);
#if !UNITY_2017_2_OR_NEWERDrawItem("Source Value", Application.srcValue);
#endif
#if !UNITY_2018_2_OR_NEWERDrawItem("Streamed Bytes", Application.streamedBytes.ToString());
#endif
#if UNITY_5_3 || UNITY_5_4DrawItem("Web Security Enabled", Application.webSecurityEnabled.ToString());
                    DrawItem("Web Security Host URL", Application.webSecurityHostUrl.ToString());
#endif
WebPlayerInformationWindow

ProfilerInformationWindow

                    DrawItem("Supported", Profiler.supported.ToString());
                    DrawItem("Enabled", Profiler.enabled.ToString());
                    DrawItem("Enable Binary Log", Profiler.enableBinaryLog ? Utility.Text.Format("True, {0}", Profiler.logFile) : "False");
#if UNITY_2018_3_OR_NEWERDrawItem("Area Count", Profiler.areaCount.ToString());
#endif
#if UNITY_5_3 || UNITY_5_4DrawItem("Max Samples Number Per Frame", Profiler.maxNumberOfSamplesPerFrame.ToString());
#endif
#if UNITY_2018_3_OR_NEWERDrawItem("Max Used Memory", GetByteLengthString(Profiler.maxUsedMemory));
#endif
#if UNITY_5_6_OR_NEWERDrawItem("Mono Used Size", GetByteLengthString(Profiler.GetMonoUsedSizeLong()));
                    DrawItem("Mono Heap Size", GetByteLengthString(Profiler.GetMonoHeapSizeLong()));
                    DrawItem("Used Heap Size", GetByteLengthString(Profiler.usedHeapSizeLong));
                    DrawItem("Total Allocated Memory", GetByteLengthString(Profiler.GetTotalAllocatedMemoryLong()));
                    DrawItem("Total Reserved Memory", GetByteLengthString(Profiler.GetTotalReservedMemoryLong()));
                    DrawItem("Total Unused Reserved Memory", GetByteLengthString(Profiler.GetTotalUnusedReservedMemoryLong()));
#elseDrawItem("Mono Used Size", GetByteLengthString(Profiler.GetMonoUsedSize()));
                    DrawItem("Mono Heap Size", GetByteLengthString(Profiler.GetMonoHeapSize()));
                    DrawItem("Used Heap Size", GetByteLengthString(Profiler.usedHeapSize));
                    DrawItem("Total Allocated Memory", GetByteLengthString(Profiler.GetTotalAllocatedMemory()));
                    DrawItem("Total Reserved Memory", GetByteLengthString(Profiler.GetTotalReservedMemory()));
                    DrawItem("Total Unused Reserved Memory", GetByteLengthString(Profiler.GetTotalUnusedReservedMemory()));
#endif
#if UNITY_2018_1_OR_NEWERDrawItem("Allocated Memory For Graphics Driver", GetByteLengthString(Profiler.GetAllocatedMemoryForGraphicsDriver()));
#endif
#if UNITY_5_5_OR_NEWERDrawItem("Temp Allocator Size", GetByteLengthString(Profiler.GetTempAllocatorSize()));
#endif
ProfilerInformationWindow

RuntimeMemorySummaryWindow

            private voidTakeSample()
            {
                m_Records.Clear();
                m_SampleTime =DateTime.Now;
                m_SampleCount = 0;
                m_SampleSize = 0L;

                UnityEngine.Object[] samples = Resources.FindObjectsOfTypeAll<UnityEngine.Object>();
                for (int i = 0; i < samples.Length; i++)
                {
                    long sampleSize = 0L;
#if UNITY_5_6_OR_NEWERsampleSize =Profiler.GetRuntimeMemorySizeLong(samples[i]);
#elsesampleSize =Profiler.GetRuntimeMemorySize(samples[i]);
#endif
                    string name =samples[i].GetType().Name;
                    m_SampleCount++;
                    m_SampleSize +=sampleSize;

                    Record record = null;
                    foreach (Record r inm_Records)
                    {
                        if (r.Name ==name)
                        {
                            record =r;
                            break;
                        }
                    }

                    if (record == null)
                    {
                        record = newRecord(name);
                        m_Records.Add(record);
                    }

                    record.Count++;
                    record.Size +=sampleSize;
                }

                m_Records.Sort(RecordComparer);
            }
RuntimeMemorySummaryWindow

Download

Entity

Event

FSM

Localization

Network

ObjectPool

Procedure

ReferencePool

Resource

Scene

Setting

Sound

UI

WebRequest

免责声明:文章转载自《GameFramework 学习》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇git am patch冲突解决步骤vue 路由嵌套 及 router-view vue-router --》children下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Unity推荐设置(HoloLens开发系列)

本文翻译自:Recommended settings for Unity   Unity提供了一系列默认选项,这些选项能够适用于所有平台的一般情况。但是,Unity同样为HoloLens提供了一些特殊行为,这些行为可以通过项目设置来改变。 本文内容 1 全息启动画面 2 追踪丢失(Tracking loss) 3 功能 4 了解更多   全息启动画面...

使用Photon引擎进行unity网络游戏开发(四)——Photon引擎实现网络游戏逻辑

使用Photon引擎进行unity网络游戏开发(四)——Photon引擎实现网络游戏逻辑 Photon PUN Unity 网络游戏开发 网络游戏逻辑处理与MasterClient 网络游戏逻辑处理: 方法一:编写Photon服务器与客户端程序 客户端传递数据之服务器,服务器完成逻辑判断,并将结果返回给客户端 方法二:编写客户...

将Flash的Sprite导入Unity(解释说明版)

usingUnityEngine; usingUnityEditor; usingSystem.IO; usingSystem.Xml; usingSystem.Reflection; public classAutoSliceSpriteSheetWithXML : AssetPostprocessor { private voidOnPr...

unity优化一些总结 (长期更新)

unity优化一些总结 (长期更新) UI: 1:尽量不要使用动态文本 2: 使用更多画布 拆分画布 ​ 我开始使用3幅画布。一个用于我的背景图像,一个用于我的主要UI元素,另一个用于需要放置在其他所有元素顶部的元素。 我了解到,每当画布中的某些内容发生变化时,整个画布都会被重新评估并重新绘制。因此,除了最简单的UI之外,将UI分成多个画布的好处可能非常重...

Unity3D学习笔记(四) 脚本内访问其他对象,组件或脚本成员方法总结

(2012-07-08 13:40:50) 部分函数尽量不可在update使用,否则极其消耗资源1.在一个脚本内访问其他对象:  想得到对象:可以用下述函数得到对象,或者直接定义一个变量让外部手动传入(可以的话尽量如此)。①通过名字访问对象(消耗资源较多),注意对象名字分为带层次和不带层次。以A为例,"A"为可带父级,"/A"为不可含父级,"C/B/A"为...

unity 2d 和 NGUI layer

http://blog.csdn.net/xtxy/article/details/37876825 在使用unity2d开发游戏的时候,使用了NGUI作为界面,本来二者配合得还挺好,但是一个使用场景出现了问题,就是一个ngui的sprite需要放置在unity2d sprite后面显示,也就是用ngui得sprite作为背景,结果发现替换sprite的a...