using System.Collections.Generic;
using UnityEngine;
namespace ModTool.Shared
{
///
/// Class for storing general ModTool settings.
///
public class ModToolSettings : Singleton
{
///
/// The product name for the project.
///
public static string productName
{
get
{
return instance._productName;
}
}
///
/// The unity version of the project.
///
public static string unityVersion
{
get
{
return instance._unityVersion;
}
}
///
/// The supported platforms for the project.
///
public static ModPlatform supportedPlatforms
{
get
{
return instance._supportedPlatforms;
}
}
///
/// The types of content that are supported for the project.
///
public static ModContent supportedContent
{
get
{
return instance._supportedContent;
}
}
///
/// ModTool's log level.
///
public static LogLevel logLevel
{
get
{
return instance._logLevel;
}
set
{
instance._logLevel = value;
}
}
///
/// List of assets that are shared with mods.
///
public static List sharedAssets
{
get
{
return instance._sharedAssets;
}
}
///
/// List of packages that are shared with mods.
///
public static List sharedPackages
{
get
{
return instance._sharedPackages;
}
}
[HideInInspector]
[SerializeField]
private string _productName;
[HideInInspector]
[SerializeField]
private string _unityVersion;
[HideInInspector]
[SerializeField]
private ModPlatform _supportedPlatforms = ModPlatform.Android | ModPlatform.Linux | ModPlatform.OSX | ModPlatform.Windows;
[HideInInspector]
[SerializeField]
private ModContent _supportedContent = ModContent.Code | ModContent.Assets | ModContent.Scenes;
[HideInInspector]
[SerializeField]
private LogLevel _logLevel = LogLevel.Info;
[HideInInspector]
[SerializeField]
private List _sharedAssets = new List();
[HideInInspector]
[SerializeField]
private List _sharedPackages = new List();
void OnEnable()
{
if (string.IsNullOrEmpty(_productName))
_productName = Application.productName;
if (string.IsNullOrEmpty(_unityVersion))
_unityVersion = Application.unityVersion;
}
[RuntimeInitializeOnLoadMethod]
private static void Initialize()
{
GetInstance();
}
}
}