- Home /
I'm trying to create a Node System using GraphView
Shadergraph seems to have some sort of way to attach a default value to a node, as seen in this image:
However, there doesn't seem to be any variable inside the Port or Node class that resembles any sort of "default value". Can anyone help me out?
@afrgplus I'm facing the same issue. Have you been able to figure this out?
Answer by AbandonedCrypt · Feb 12, 2021 at 09:25 AM
Think of the "default value" as its own node. Imagine you instantiate a node that should have a default value, you would just instantiate a "Value" node (with your desired default value) that is connected to the port which you want to have a default value together with your main node. @Sanavesa
Thank you for this insight. I managed to implement it after this $$anonymous$$dset shift. Cheers.
Almost a year after asking this question and having left a tool mid development because of the lack of information there was online about this API, I returned to it, and you're absolutely right, thank you :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613020911im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Does code wrapped in #if UNITY_EDITOR appear anywhere in builds? 3 Answers
When do the Attributes get set? 1 Answer
5.3 Multi scene editor Selection 0 Answers
PropertyDrawer let's dissapear my INT 0 Answers
unused keys for editor scripts 0 Answers