private void Init() { IsRootUser = CTool.HasWriteAccessToFolder(Application.dataPath); // Root User运行时,能穿越沙盒写DataPath, 以此为依据 if (Debug.isDebugBuild) { RenderWatcher = new CFpsWatcher(0.95f); } if (Debug.isDebugBuild) { CDebug.Log("===================================================================================="); CDebug.Log("Application.platform = {0}", Application.platform); CDebug.Log("Application.dataPath = {0} , WritePermission: {1}", Application.dataPath, IsRootUser); CDebug.Log("Application.streamingAssetsPath = {0} , WritePermission: {1}", Application.streamingAssetsPath, CTool.HasWriteAccessToFolder(Application.streamingAssetsPath)); CDebug.Log("Application.persistentDataPath = {0} , WritePermission: {1}", Application.persistentDataPath, CTool.HasWriteAccessToFolder(Application.persistentDataPath)); CDebug.Log("Application.temporaryCachePath = {0} , WritePermission: {1}", Application.temporaryCachePath, CTool.HasWriteAccessToFolder(Application.temporaryCachePath)); CDebug.Log("Application.unityVersion = {0}", Application.unityVersion); CDebug.Log("SystemInfo.deviceModel = {0}", SystemInfo.deviceModel); CDebug.Log("SystemInfo.deviceUniqueIdentifier = {0}", SystemInfo.deviceUniqueIdentifier); CDebug.Log("===================================================================================="); } StartCoroutine(DoInit()); }
private void Init() { IsRootUser = CTool.HasWriteAccessToFolder(Application.dataPath); // Root User运行时,能穿越沙盒写DataPath, 以此为依据 if (ShowFps) { RenderWatcher = new CFpsWatcher(0.95f); } if (Debug.isDebugBuild) { CDebug.Log("===================================================================================="); CDebug.Log("Application.platform = {0}", Application.platform); CDebug.Log("Application.dataPath = {0} , WritePermission: {1}", Application.dataPath, IsRootUser); CDebug.Log("Application.streamingAssetsPath = {0} , WritePermission: {1}", Application.streamingAssetsPath, CTool.HasWriteAccessToFolder(Application.streamingAssetsPath)); CDebug.Log("Application.persistentDataPath = {0} , WritePermission: {1}", Application.persistentDataPath, CTool.HasWriteAccessToFolder(Application.persistentDataPath)); CDebug.Log("Application.temporaryCachePath = {0} , WritePermission: {1}", Application.temporaryCachePath, CTool.HasWriteAccessToFolder(Application.temporaryCachePath)); CDebug.Log("Application.unityVersion = {0}", Application.unityVersion); CDebug.Log("SystemInfo.deviceModel = {0}", SystemInfo.deviceModel); CDebug.Log("SystemInfo.deviceUniqueIdentifier = {0}", SystemInfo.deviceUniqueIdentifier); CDebug.Log("===================================================================================="); } StartCoroutine(DoInit()); }