From ae9793d6f933958ddc27aa782642cbca1fce62aa Mon Sep 17 00:00:00 2001 From: ninemine <1371605831@qq.com> Date: Fri, 12 Dec 2025 11:26:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EScriptableAttribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Framework/ScriptableObject.cs | 25 ++++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Framework/ScriptableObject.cs b/Assets/Scripts/Framework/ScriptableObject.cs index 7f222d7..1337925 100644 --- a/Assets/Scripts/Framework/ScriptableObject.cs +++ b/Assets/Scripts/Framework/ScriptableObject.cs @@ -1,14 +1,15 @@ +using Convention; +using Convention.RScript; +using Convention.WindowsUI.Variant; +using Demo.Attr; +using Demo.Game; +using Dreamteck.Splines; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; -using Convention; -using Convention.RScript; -using Convention.WindowsUI.Variant; -using Demo.Game; -using Dreamteck.Splines; using Unity.VisualScripting; using UnityEngine; @@ -21,6 +22,20 @@ namespace Demo #region ScriptableObject Inside + namespace Attr + { + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] + sealed class ScriptableAttribute : Attribute + { + public readonly string generaterName; + + public ScriptableAttribute(string generaterName = "Make") + { + this.generaterName = generaterName; + } + } + } + public partial class ScriptableObject : IScriptableObject { ///