Example #1
0
    public static bool IsIgnoreWindow()
    {
        string path = Pvr_SDKSetting.assetPath + typeof(CPicoSDKSettingAsset).ToString() + ".asset";

        if (File.Exists(path))
        {
            CPicoSDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <CPicoSDKSettingAsset>(path);
            return(asset.IgnoreSDKSetting);
        }
        return(false);
    }
    public static bool IsAppIDChecked()
    {
        string path = Pvr_SDKSetting.assetPath + typeof(CPicoSDKSettingAsset).ToString() + ".asset";

        if (File.Exists(path))
        {
            CPicoSDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <CPicoSDKSettingAsset>(path);
            return(asset.AppIDChecked && Pvr_UnitySDKPlatformSetting.StartTimeEntitlementCheck);
        }
        return(false);
    }
    static bool GetDontshowBuildWaring()
    {
        string path = Pvr_SDKSetting.assetPath + typeof(CPicoSDKSettingAsset).ToString() + ".asset";

        if (File.Exists(path))
        {
            CPicoSDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <CPicoSDKSettingAsset>(path);
            if (asset != null)
            {
                return(asset.DontshowBuildWaring);
            }
        }
        return(false);
    }
    private void SaveAssetDataBase()
    {
        CPicoSDKSettingAsset asset;
        string assetpath = Pvr_SDKSetting.assetPath + typeof(CPicoSDKSettingAsset).ToString() + ".asset";

        if (File.Exists(assetpath))
        {
            asset = AssetDatabase.LoadAssetAtPath <CPicoSDKSettingAsset>(assetpath);
        }
        else
        {
            asset = new CPicoSDKSettingAsset();
            ScriptableObjectUtility.CreateAsset <CPicoSDKSettingAsset>(asset, Pvr_SDKSetting.assetPath);
        }
        asset.IgnoreSDKSetting = true;
        EditorUtility.SetDirty(asset);
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();//must Refresh
    }
    public static void SetDontshowBuildWaring()
    {
        string path = Pvr_SDKSetting.assetPath + typeof(CPicoSDKSettingAsset).ToString() + ".asset";
        CPicoSDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <CPicoSDKSettingAsset>(path);

        if (File.Exists(path))
        {
            asset.DontshowBuildWaring = true;
        }
        else
        {
            asset = new CPicoSDKSettingAsset();
            ScriptableObjectUtility.CreateAsset <CPicoSDKSettingAsset>(asset, Pvr_SDKSetting.assetPath);
        }
        asset.DontshowBuildWaring = true;
        EditorUtility.SetDirty(asset);
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();  //must Refresh
    }