120 lines
No EOL
4.4 KiB
C#
120 lines
No EOL
4.4 KiB
C#
using System;
|
|
using ShiroginSDK.Runtime.Core.Editor.Attributes;
|
|
using ShiroginSDK.Runtime.Core.Editor.Models;
|
|
using ShiroginSDK.Runtime.Modules.Data.Scripts.Icons;
|
|
using ShiroginSDK.Runtime.Modules.IAP.Scripts.SO;
|
|
using ShiroginSDK.Runtime.Modules.RemoteConfig.Scripts.SO;
|
|
using ShiroginSDK.Runtime.Modules.UI.Popup.Scripts.SO;
|
|
using ShiroginSDK.Runtime.Modules.UI.Theme.Scripts.SO;
|
|
using ShiroginSDK.Runtime.Shared.Constants;
|
|
using UnityEngine;
|
|
|
|
namespace ShiroginSDK.Runtime.Core.SDK
|
|
{
|
|
[CreateAssetMenu(fileName = "ShiroginConfig", menuName = "ShiroginSDK/ShiroginConfig", order = 0)]
|
|
public class ShiroginConfig : ScriptableObject
|
|
{
|
|
private static ShiroginConfig _instance;
|
|
|
|
// --- SDK Settings ---
|
|
[Header("SDK Settings")]
|
|
[Tooltip("Enable or disable ShiroginSDK Analytics globally. (SHIROGIN_SDK)")]
|
|
public bool enableSdk = false;
|
|
|
|
[Tooltip("Enable or disable Unity IAP globally. (SHIROGIN_IAP)")]
|
|
public bool enableIAP = false;
|
|
|
|
[Tooltip("Enable or disable Ad Service globally. (SHIROGIN_AD_SERVICE)")]
|
|
public bool enableAdService = false;
|
|
|
|
[Tooltip("Enable or disable Analytics globally. (SHIROGIN_ANALYTICS)")]
|
|
public bool enableAnalytics = false;
|
|
|
|
[Tooltip("Enable or disable Firebase Analytics globally. (SHIROGIN_FIREBASE_ANALYTICS)")]
|
|
public bool enableFirebaseAnalytics = false;
|
|
|
|
[Tooltip("Enable or disable AppsFlyer Analytics globally. (SHIROGIN_APPSFLYER)")]
|
|
public bool enableAppsFlyerAnalytics = false;
|
|
|
|
[Tooltip("Enable or disable Facebook Analytics globally. (SHIROGIN_FACEBOOK)")]
|
|
public bool enableFacebook = false;
|
|
|
|
[Tooltip("Enable or disable Firebase RemoteConfig globally. (SHIROGIN_FIREBASE_REMOTE_CONFIG)")]
|
|
public bool enableFirebaseRemoteConfig = false;
|
|
|
|
// --- Bitbucket & General ---
|
|
[Header("Bitbucket Settings")]
|
|
public string bitbucketAccessToken;
|
|
|
|
[Header("AppLovin Settings")]
|
|
public string applovinSdkKey;
|
|
|
|
[SubHeader("Android Ad Units")]
|
|
public string rewardedAdUnitIdDrd;
|
|
public string interstitialAdUnitIdDrd;
|
|
public string bannerAdUnitIdDrd;
|
|
|
|
[SubHeader("iOS Ad Units")]
|
|
public string rewardedAdUnitIdIos;
|
|
public string interstitialAdUnitIdIos;
|
|
public string bannerAdUnitIdIos;
|
|
|
|
// --- AppsFlyer ---
|
|
[Header("AppsFlyer Settings")]
|
|
public string appsFlyerDevKey;
|
|
|
|
[Tooltip("This is Apple app id (Only numbers)")]
|
|
public string appsFlyerAppId;
|
|
|
|
// --- Repositories ---
|
|
[Header("Repositories")]
|
|
[Tooltip("All IAP and store products managed from here.")]
|
|
public StoreRepository storeRepository;
|
|
|
|
[Tooltip("All Theme information managed from here")]
|
|
public ThemeRepository themeRepository;
|
|
|
|
[Tooltip("All Popup information managed from here")]
|
|
public PopupRepository popupRepository;
|
|
|
|
// --- Remote Config ---
|
|
[Header("Remote Config")]
|
|
[Tooltip("Select which Firebase Remote Config group this game should use (e.g., DizzyHero, MoneyRoller, etc.)")]
|
|
public string selectedRemoteGroup = "DefaultGroup";
|
|
|
|
[Tooltip("Link to the RemoteConfigDefinition asset for editor preview/export")]
|
|
public RemoteConfigDefinition remoteConfigDefinition;
|
|
|
|
// --- UI & Developer ---
|
|
[Header("UI / Visual Settings")]
|
|
[Tooltip("Icon set for all in-game currencies (Gems, Gold, etc.)")]
|
|
public CurrencyIconLibrary currencyIconLibrary;
|
|
|
|
[Header("Developer Settings")]
|
|
[SubHeader("AppLovin Settings")]
|
|
[Tooltip("AppLovin Test Devices (AID-IDFA) list for testing")]
|
|
public TestDevice[] applovinTestDevices;
|
|
|
|
/// <summary>
|
|
/// Loads the SDK configuration from Resources folder.
|
|
/// </summary>
|
|
public static ShiroginConfig Load()
|
|
{
|
|
if (_instance != null)
|
|
return _instance;
|
|
|
|
_instance = Resources.Load<ShiroginConfig>(SDKConstants.ConfigResourcePath);
|
|
|
|
if (_instance == null)
|
|
{
|
|
#if UNITY_EDITOR
|
|
Debug.LogError("[ShiroginSDK] ❌ SDKConfig asset not found! " +
|
|
"Please create 'ShiroginConfig.asset' inside a Resources folder.\n" +
|
|
"Path: Assets/ShiroginSDK/Resources/ShiroginConfig.asset");
|
|
#endif
|
|
}
|
|
|
|
return _instance;
|
|
}
|
|
}
|
|
} |