mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Fix for drawer priority of primitives over dynamic port lists
This commit is contained in:
parent
0152b6d5d6
commit
50250caa32
@ -11,6 +11,23 @@ using static XNode.Node;
|
||||
|
||||
namespace XNodeEditor.Odin
|
||||
{
|
||||
[DrawerPriority( 0.4, 0, 0 )]
|
||||
public class DynamicPortCollectionOverrideDrawer<T> : CollectionDrawer<T>
|
||||
{
|
||||
protected override bool CanDrawValueProperty( InspectorProperty property )
|
||||
{
|
||||
var input = property.GetAttribute<InputAttribute>();
|
||||
if ( input != null )
|
||||
return input.dynamicPortList;
|
||||
|
||||
var output = property.GetAttribute<OutputAttribute>();
|
||||
if ( output != null )
|
||||
return output.dynamicPortList;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[ResolverPriority( 10 )]
|
||||
public class DynamicPortListBackedResolver<TList, TElement> : StrongListPropertyResolver<TList, TElement>
|
||||
where TList : IList<TElement>
|
||||
|
||||
@ -13,6 +13,7 @@ using static XNode.Node;
|
||||
|
||||
namespace XNodeEditor
|
||||
{
|
||||
[ResolverPriority( 10 )]
|
||||
public class DynamicPortListNoDataResolver<TNotAList> : BaseOrderedCollectionResolver<TNotAList>
|
||||
{
|
||||
public override bool CanResolveForPropertyFilter( InspectorProperty property )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user