移除不用的脚本
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
using SRF;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
using UnityEngine.Profiling;
|
||||
#endif
|
||||
|
||||
public class ProfilerMemoryBlock : SRMonoBehaviourEx
|
||||
{
|
||||
@@ -41,13 +39,8 @@
|
||||
long max;
|
||||
long current;
|
||||
|
||||
#if UNITY_5_6_OR_NEWER
|
||||
max = Profiler.GetTotalReservedMemoryLong();
|
||||
current = Profiler.GetTotalAllocatedMemoryLong();
|
||||
#else
|
||||
max = Profiler.GetTotalReservedMemory();
|
||||
current = Profiler.GetTotalAllocatedMemory();
|
||||
#endif
|
||||
|
||||
var maxMb = (max >> 10);
|
||||
maxMb /= 1024; // On new line to fix il2cpp
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
using SRF;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
using UnityEngine.Profiling;
|
||||
#endif
|
||||
|
||||
public class ProfilerMonoBlock : SRMonoBehaviourEx
|
||||
{
|
||||
@@ -29,11 +27,7 @@
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
#if UNITY_5_6_OR_NEWER
|
||||
_isSupported = Profiler.GetMonoUsedSizeLong() > 0;
|
||||
#else
|
||||
_isSupported = Profiler.GetMonoUsedSize() > 0;
|
||||
#endif
|
||||
|
||||
NotSupportedMessage.SetActive(!_isSupported);
|
||||
CurrentUsedText.gameObject.SetActive(_isSupported);
|
||||
@@ -57,13 +51,8 @@
|
||||
long max;
|
||||
long current;
|
||||
|
||||
#if UNITY_5_6_OR_NEWER
|
||||
max = _isSupported ? Profiler.GetMonoHeapSizeLong() : GC.GetTotalMemory(false);
|
||||
current = Profiler.GetMonoUsedSizeLong();
|
||||
#else
|
||||
max = _isSupported ? Profiler.GetMonoHeapSize() : GC.GetTotalMemory(false);
|
||||
current = Profiler.GetMonoUsedSize();
|
||||
#endif
|
||||
|
||||
var maxMb = (max >> 10);
|
||||
maxMb /= 1024; // On new line to workaround IL2CPP bug
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
using SRF;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
using UnityEngine.Profiling;
|
||||
#endif
|
||||
|
||||
public class ProfilerEnableControl : SRMonoBehaviourEx
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user