Closed JusamLiu closed 3 years ago
The requirement for supporting odin serialize attributes and unity built-in field attributes are the same: I need to use SerializeField to display the fields in UIElement.
The problem is that currently I can't use it because the fields are not serialized, it will be the case when the big serialization refactor lands, but I don't really know when it will be ready (I still wait for a fix on Unity side).
So to answer your question, it's planned but waiting for the serialization task to be completed :)
OK, I have almost completed this task, this is my Fork version from the author library, combined with Odin serialization:https://github.com/wqaetly/NodeGraphProcessor This is a related blog I wrote to introduce it:https://www.lfzxb.top/nodegraphprocesssor-and-odin/ Below are some screenshots
The requirement for supporting odin serialize attributes and unity built-in field attributes are the same: I need to use SerializeField to display the fields in UIElement.
The problem is that currently I can't use it because the fields are not serialized, it will be the case when the big serialization refactor lands, but I don't really know when it will be ready (I still wait for a fix on Unity side).
So to answer your question, it's planned but waiting for the serialization task to be completed :)
Hi @alelievr , any update on this? :)
The serialization refactor has landed but there is still an issue with the ApplySerializedProperty() function that re-creates all the node data which causes all the nodes to lose their references. So I'm waiting for this issue to be fixed to finish implementing the feature.
So the serialization refactor is in the master branch, but it's not stable for use in products yet?
Okay, I managed to finish the implementation of SerializedProperties in the node views so now all the builtin Unity property drawers as well as the CustomPropertyDrawers in Odin inspector.
I think it's fairly stable now, so all this work will be available in the next release: the 1.3.0
Here's an example with UnityEvent builtin drawer:
And the node code:
using UnityEngine;
using GraphProcessor;
using UnityEngine.Events;
[System.Serializable, NodeMenuItem("Custom/Unity Event Node")]
public class UnityEventNode : BaseNode
{
[Input(name = "In")]
public float input;
[Output(name = "Out")]
public float output;
public UnityEvent evt;
public override string name => "Unity Event Node";
}
Awesome!!!
Fantastic! 🦾
Yeah saves soo much extra work. Btw there is still some visual problem with lists here (nodes with lists get very tall)
Hum, it seems to be an issue on GraphView side, I'll see if I can add a workaround somewhere to avoid that issue
I added this bit of code: https://github.com/alelievr/NodeGraphProcessor/commit/35a0514379d252c019545b41525841eb76626440#diff-88aab6f235f642dfb544df6a26caf202382529e8e056a03c2eaf60934faeb4ceR271
Seems to work pretty well
Border fixed...node not fixed. here is an example with your list node( My mouse is outside the node bellow it, I can select the node from there. Preventing me to select anything else. works only when the list is unfolded. )
Yeah, I can't do much more than that. I've reported the bug in the bug tracker: https://issuetracker.unity3d.com/product/unity/issues/guid/1351693/
Hopefully, it will be fixed soon as it only happens on the 2021.2 betas.
Do we have a plan about support odin serialize,beacause it's attribute is very convenient and simple? eg: drawing List or custom type.