Updated RelayNode;
Added ISlot interface; Added ProxySlot;
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Properties;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Misaki.GraphView.Editor.Editor.Helpers
|
||||
namespace Misaki.GraphView.Editor
|
||||
{
|
||||
public class PropertyFieldHelper
|
||||
{
|
||||
private static readonly Dictionary<Type, Func<string, VisualElement>> _propertyFieldCreators = new ()
|
||||
private static readonly Dictionary<Type, Func<string, VisualElement>> _propertyFieldCreators = new()
|
||||
{
|
||||
{typeof(float), (s) => new FloatField(s)},
|
||||
{typeof(int), (s) => new IntegerField(s)},
|
||||
@@ -18,7 +16,7 @@ namespace Misaki.GraphView.Editor.Editor.Helpers
|
||||
{typeof(bool), (s) => new Toggle(s)},
|
||||
{typeof(string), (s) => new TextField(s)}
|
||||
};
|
||||
|
||||
|
||||
public static VisualElement CreatePropertyField(Type propertyType, object dataSource, PropertyPath bindingPath, string label)
|
||||
{
|
||||
if (_propertyFieldCreators.TryGetValue(propertyType, out var creator))
|
||||
|
||||
Reference in New Issue
Block a user