File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -609,6 +609,8 @@ void GetScriptableObjectTypes(List<System.Type> result)
609609 continue ;
610610 if ( ! a . allowSubClass && t != a . type )
611611 continue ;
612+ if ( a . excludeThisClass && t == a . type )
613+ continue ;
612614 supportsType = true ;
613615 break ;
614616 }
Original file line number Diff line number Diff line change @@ -35,6 +35,17 @@ public bool allowSubClass
3535 set ;
3636 }
3737
38+ /// <summary>
39+ /// Whether to create a menu item for the <see cref="type"/> specifically. It's useful when you add
40+ /// the <see cref="CreateSubAssetMenuAttribute"/> to a base-class where you want all sub-classes to
41+ /// have menu items generated for, except for the base-class.
42+ /// </summary>
43+ public bool excludeThisClass
44+ {
45+ get ;
46+ set ;
47+ }
48+
3849 /// <summary>
3950 /// The display name for this type shown in the "Add Object" menu.
4051 /// If <see cref="menuName"/> is empty, it uses the type name instead.
You can’t perform that action at this time.
0 commit comments