| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /*
- #########
- ############
- #############
- ## ###########
- ### ###### #####
- ### ####### ####
- ### ########## ####
- #### ########### ####
- #### ########### #####
- ##### ### ######## #####
- ##### ### ######## ######
- ###### ### ########### ######
- ###### #### ############## ######
- ####### ##################### ######
- ####### ###################### ######
- ####### ###### ################# ######
- ####### ###### ###### ######### ######
- ####### ## ###### ###### ######
- ####### ###### ##### #####
- ###### ##### ##### ####
- ##### #### ##### ###
- ##### ### ### #
- ### ### ###
- ## ### ###
- __________#_______####_______####______________
- 我们的未来没有BUG
- * ==============================================================================
- * Filename: NativeHelper
- * Created: 2018/7/13 14:29:22
- * Author: エル・プサイ・コングリィ
- * Purpose:
- * ==============================================================================
- */
- #if UNITY_EDITOR || USE_LUA_PROFILER
- namespace MikuLuaProfiler
- {
- using System;
- using System.Diagnostics;
- using System.Runtime.InteropServices;
- using UnityEngine;
- #if UNITY_5_5_OR_NEWER
- using UnityEngine.Profiling;
- #endif
- public static class NativeHelper
- {
- public static int GetPass()
- {
- #if UNITY_5_5_OR_NEWER
- return (int)Profiler.GetTotalAllocatedMemoryLong();
- #else
- return (int)Profiler.GetTotalAllocatedMemory();
- #endif
- }
- public static float GetBatteryLevel()
- {
- float result = 100;
- return result;
- }
- }
- }
- #endif
|