Anyone know the logic for what aspects of an element get updated in a scene?
I have a 'level logic' microchip I use in many scenes, and I updated it with some extra functionality which required adding a new microchip to the element. However, if I update the element inside my scenes, the microchip is not there. Other changes in the element are there, so it's just the microchip not being added.
I then tried attaching the microchip to a sculpture in the scene, and then it -did- update. Cool! Not ideal, but at least I can work with that.
So I also attached some other microchips to sculptures in the scene, ones that existed already. Then I found...they disappeared. They apparently were still in the scene somewhere, but just not visible or anywhere to be seen.
Sooo...I'm scratching my head over this. Updating scene elements (and perhaps in particular ones that get modified on a per-scene basis) just doesn't seem very reliable, but I would like to know more about specifically what's going on to cause these strange results.
-
Additional, my new microchip had some nodes from an old microchip moved into it. Once I was able to get the microchip to update into my scenes, these moved nodes were missing. Turns out, they were still in the old microchip! But, they were also moved / in position they would be if they were on the new microchip.
Clearly there's some kind of diffing logic going on as Dreams needs to keep track of changes to objects so it doesn't replace the whole element in a scene (in case it has been modified). In this instance of creating a new microchip, it doesn't seem to have worked well though.
Eventually I worked through all these problems. For future work, I would really like to know more about how to avoid such situations in the future and so having some more understanding of how the update system works would be super useful. -
The basic idea is, it'll look for the imported objects, and update those. If they no longer exist in the actual element, they'll be deleted. If they exist but as different literal objects (eg. you cloned a node and deleted the old one for some reason) then the one that was already imported will be removed.
It's one of those things that would be very hard to prove all the edge cases for, which is why I haven't tracked this down.
But in general, the update system isn't perfect. It may break things. If so, try just re-importing. Try not to change too much about it in the scene itself unless you have to, so that the update will go more smoothly. But be prepared to rejig some stuff if it breaks.
Please sign in to leave a comment.