fix: MessageContent::Build being called too late - #22
Merged
LumiFae merged 1 commit intoMar 5, 2026
Conversation
…te after the event causing it to have not up-to-date values
LumiFae
requested changes
Mar 5, 2026
OMEGA3065
force-pushed
the
fix/TranslationBuilderWaitTime
branch
from
March 5, 2026 17:35
3678ea6 to
921361c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
MessageContent::Build is called on the main thread fixing the Unity crashes, but this is at a cost of data accuracy.
The old system used data from when the event occurred, but the new system can be 1 Frame/Tick too late causing some data to be unusable.
An example of this is how DeathLogs would have the Player's (person who is killed) role be replaced with the role before they died (useful), but with the new system calling the builder 1 frame later causes it to be always set to Spectator.
This could be potentially also fixed by using some sort of snapshot system where data that can be used is fed into the translation methods generating delegates which will return the correct data based on the player or simply by having a custom class which will store all necessary player data.