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);

