Cache defaults for unique scenes which use the same script #2676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I got an annoying to find, but in context...
I was playing around with dialogic so I can learn to use it and I'm structuring my project in such a way that I have a base character script which is shared between multiple character scenes, like these ones:
Found out while experimenting, when I have some props which I don't modify in dialogic's character menu, the first character who joins the timeline fills the cache metadata with their defaults, while whatever other characters join next will just use the first character's defaults and that's the basically the problem.
I tested putting a name string property for the characters, something like "@export var dialogicName: String", which would have the strings "Krauss" for Krauss and "Natsuhi" for Natsuhi, and while playing the timeline and checking with the debbuger, because Krauss joined first, Natsuhi was getting Krauss's defaults and getting "Krauss" name as the "dialogicName" prop.
The fix was simple, instead of saving the cache by script path, just save by scene node path... I don't know the dialogic's codebase fully so I'm open for other alternatives.