[Solved] How to use scriptableobject in graph view?

Hello so i try to use scriptableobject in graph view.
I cant find any info on it and after 5 hours of being unable to find anything.
I decided I might as well try asking the forums.

so here i got a example on how to make a text field.

            var textField = new TextField("");
            textField.RegisterValueChangedCallback(evt =>
            {
                DialogueText = evt.newValue;
            });
            textField.SetValueWithoutNotify(DialogueText);
            mainContainer.Add(textField);

Here is how it looks

so anyone know how to add a field were i can add a scriptableobject like the Textfield?

Update - - -

After a PM I managed to find a solution.

public MyScriptableObject ScriptableObject { get; set; }


          var objField_ScriptableObject = new ObjectField
            {
                objectType = typeof(MyScriptableObject),
                allowSceneObjects = false,
                value = MyScriptableObject,
            };

            objField_ScriptableObject.RegisterValueChangedCallback(v =>
            {
                ScriptableObject = objField_ScriptableObject.value as MyScriptableObject;
            });

            mainContainer.Add(objField_ScriptableObject);

1 Like

Is this using Bolt? If so, might be better to ask in the Visual Scripting forum. Likely to get some answers there.

Hey Vryken.
No it using graph view as it say in the title :slight_smile:
But at a first glance it could look the same.