init
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user