Exemple #1
0
    private void Init()
    {
        IsRootUser = CTool.HasWriteAccessToFolder(Application.dataPath);  // Root User运行时,能穿越沙盒写DataPath, 以此为依据

        if (Debug.isDebugBuild)
        {
            RenderWatcher = new CFpsWatcher(0.95f);
        }

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

        if (Debug.isDebugBuild)
        {
            RenderWatcher = new CFpsWatcher(0.95f);
        }

        if (Debug.isDebugBuild)
        {
            CBase.Log("====================================================================================");
            CBase.Log("Application.platform = {0}", Application.platform);
            CBase.Log("Application.dataPath = {0} , WritePermission: {1}", Application.dataPath, IsRootUser);
            CBase.Log("Application.streamingAssetsPath = {0} , WritePermission: {1}", Application.streamingAssetsPath, CTool.HasWriteAccessToFolder(Application.streamingAssetsPath));
            CBase.Log("Application.persistentDataPath = {0} , WritePermission: {1}", Application.persistentDataPath, CTool.HasWriteAccessToFolder(Application.persistentDataPath));
            CBase.Log("Application.temporaryCachePath = {0} , WritePermission: {1}", Application.temporaryCachePath, CTool.HasWriteAccessToFolder(Application.temporaryCachePath));
            CBase.Log("Application.unityVersion = {0}", Application.unityVersion);
            CBase.Log("SystemInfo.deviceModel = {0}", SystemInfo.deviceModel);
            CBase.Log("SystemInfo.deviceUniqueIdentifier = {0}", SystemInfo.deviceUniqueIdentifier);
            CBase.Log("====================================================================================");
        }
        StartCoroutine(DoInit());
    }