using UnityEngine; namespace StansAssets.Plugins { /// /// Base class for the plugin settings. /// public abstract class PackageScriptableSettings : ScriptableObject { /// /// Plugin package name. /// public abstract string PackageName { get; } /// /// Plugin settings folder path. /// public virtual string SettingsFolderPath { get { var folderPath = $"{PackagesConfig.SettingsPath}/{PackageName}"; if (IsEditorOnly) { folderPath += "/Editor"; } folderPath += "/Resources"; return folderPath; } } /// /// Plugin settings file path. /// public virtual string SettingsFilePath => $"{SettingsFolderPath}/{SettingsFileName}.asset"; /// /// Settings file name. /// public virtual string SettingsFileName => GetType().Name; protected virtual bool IsEditorOnly => false; } }