How do I mark a visual scripting node / unit as dirty for serialization

Hi there,

If I have a monobehaviour that I want to mark as dirty for serialization I can just call:


Attempting that in a custom visual scripting node, specifically something inheriting from Unity.VisualScripting.EventUnit, causes this error:

Error CS1503 Argument 1: cannot convert from ‘MyNodeType’ to ‘UnityEngine.Object’

Any suggestions?

Thanks in advance

Select Visual Scripting. Expand Node Library. In the assemblies list, locate the entry for the assembly you want to remove. Select Remove (-)- 1

,Visual scripting has two configuration options available. Access them both through Edit > Project Settings > Visual Scripting; Type Options: choose the type for variables and units. MonoBehaviour types are always included- 1