You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.IO;
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
|
|
|
|
|
[CustomEditor(typeof(IronSourceMediationSettings))]
|
|
|
|
|
public class IronSourceMediationSettingsInspector : UnityEditor.Editor
|
|
|
|
|
{
|
|
|
|
|
private static IronSourceMediationSettings ironSourceMediationSettings;
|
|
|
|
|
public static IronSourceMediationSettings IronSourceMediationSettings
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (ironSourceMediationSettings == null)
|
|
|
|
|
{
|
|
|
|
|
ironSourceMediationSettings = AssetDatabase.LoadAssetAtPath<IronSourceMediationSettings>(IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH);
|
|
|
|
|
if (ironSourceMediationSettings == null)
|
|
|
|
|
{
|
|
|
|
|
IronSourceMediationSettings asset = CreateInstance<IronSourceMediationSettings>();
|
|
|
|
|
Directory.CreateDirectory(IronSourceConstants.IRONSOURCE_RESOURCES_PATH);
|
|
|
|
|
AssetDatabase.CreateAsset(asset, IronSourceMediationSettings.IRONSOURCE_SETTINGS_ASSET_PATH);
|
|
|
|
|
ironSourceMediationSettings = asset;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ironSourceMediationSettings;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|