public static bool IsAppIDChecked() { string path = PXR_SDKSettingEditor.assetPath + typeof(PXR_SDKSettingAsset).ToString() + ".asset"; if (File.Exists(path)) { PXR_SDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <PXR_SDKSettingAsset>(path); return(asset.appIDChecked && PXR_PlatformSetting.Instance.startTimeEntitlementCheck && PXR_PlatformSetting.Instance.appID != null); } return(false); }
public static bool IsIgnoreWindow() { string path = assetPath + typeof(PXR_SDKSettingAsset).ToString() + ".asset"; if (File.Exists(path)) { PXR_SDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <PXR_SDKSettingAsset>(path); return(asset.ignoreSDKSetting); } return(false); }
static bool GetDoNotShowBuildWarning() { string path = PXR_SDKSettingEditor.assetPath + typeof(PXR_SDKSettingAsset).ToString() + ".asset"; if (File.Exists(path)) { PXR_SDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <PXR_SDKSettingAsset>(path); if (asset != null) { return(asset.doNotShowBuildWarning); } } return(false); }
private void SaveAssetAppIDChecked() { PXR_SDKSettingAsset asset; string assetPath = PXR_SDKSettingEditor.assetPath + typeof(PXR_SDKSettingAsset).ToString() + ".asset"; if (File.Exists(assetPath)) { asset = AssetDatabase.LoadAssetAtPath <PXR_SDKSettingAsset>(assetPath); } else { asset = new PXR_SDKSettingAsset(); ScriptableObjectUtility.CreateAsset <PXR_SDKSettingAsset>(asset, PXR_SDKSettingEditor.assetPath); } asset.appIDChecked = true; EditorUtility.SetDirty(asset); AssetDatabase.SaveAssets(); AssetDatabase.Refresh();//must Refresh }
public static void SetDoNotShowBuildWarning() { string path = PXR_SDKSettingEditor.assetPath + typeof(PXR_SDKSettingAsset).ToString() + ".asset"; PXR_SDKSettingAsset asset = AssetDatabase.LoadAssetAtPath <PXR_SDKSettingAsset>(path); if (File.Exists(path)) { asset.doNotShowBuildWarning = true; } else { asset = new PXR_SDKSettingAsset(); ScriptableObjectUtility.CreateAsset <PXR_SDKSettingAsset>(asset, PXR_SDKSettingEditor.assetPath); } asset.doNotShowBuildWarning = true; EditorUtility.SetDirty(asset); AssetDatabase.SaveAssets(); AssetDatabase.Refresh();//must Refresh }