This whole section has been quite a mission - thank you Sam and Brian for engaging with us. I’m reasonably satisfied with the result, although I am slightly aghast at Unity’s documentation and inconsistent behaviour in this area. Regardless it looks like we have something that pretty much works now.
There is just one remaining issue I’ve found - even though the ScriptableObject is not part of the Scene, creating/adding a new node still dirties the Scene. No other operations (including deleting a node) seems to do this. I tracked it down to the Undo.RegisterCreatedObjectUndo()
call in Dialogue.CreateNode()
. It seems that this call will dirty the scene even though the SO isn’t part of it, nor an indirect dependency of it either. Having being unable to find any documentation about this behaviour, I think we’ll just have to chalk it up as a bug and live with it. Am I giving up too easily? I just want to get on with the rest of the course now!