21 lines
709 B
C#
21 lines
709 B
C#
using System;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace RPGCoreCommon.Settings
|
|
{
|
|
[AttributeUsage(AttributeTargets.Class)]
|
|
public class CustomSettingsAttribute : Attribute
|
|
{
|
|
internal string path { private set; get; }
|
|
|
|
/// <summary>
|
|
/// Optionally attached to class that extends <see cref="CustomSettingsSO"/>.<br/>
|
|
/// All paths in project should be unique otherwise different name will be generated.
|
|
/// </summary>
|
|
/// <param name="path">custom path and name with "/" as delimiter.</param>
|
|
public CustomSettingsAttribute(string path)
|
|
{
|
|
this.path = new Regex("/+").Replace(path, "/").Trim('/');
|
|
}
|
|
}
|
|
} |