alelievr / NodeGraphProcessor

Node graph editor framework focused on data processing using Unity UIElements and C# 4.6
https://github.com/alelievr/NodeGraphProcessor/projects/2
MIT License
2.34k stars 387 forks source link

ExposedParams using PropertyDrawers are always disabled. #165

Closed NiftyHat closed 3 years ago

NiftyHat commented 3 years ago

When adding a custom ExposedParam that has a value that uses a PropertyDrawer using IMGUIContainer when the PropertyDrawer is rendered in the inspector on BaseGraph it's always disabled (visible but values can't be changed).

I have serialized class UIntTable containing a array of UIntRow objects and rendered in the inspector using UIntTablePropertyDrawer. When this is displayed using an ExposedParamater using

    [Serializable]
    public class UIntTableParameter : ExposedParameter
    {
        [SerializeField] UIntTable val;

        public override object value { get => val; set => val = (UIntTable)value; }
        public override Type GetValueType() => typeof(UIntTable);
    }

The UIntRows are always disabled in the inspector for the BaseGraph.

Reordable List rendered using a CustomPropertyDrawer in a regular asset image Reordable List rendered using a CustomPropertyDrawer and wrapped in an ExposedParameter for BaseGraph image

alelievr commented 3 years ago

Thanks for the report, the issue is fixed in this commit: 17f1da0c443dd7db947c9594fee1be6f55b9d8e1