The actor sheets populates context.warnings with a copy of the preparation warnings to render them on the sheet. Adding warnings during sheet preparation works so long as there are existing warnings, but if the actor doesn't contain any warnings at the start then the warning button won't appear in the header because it checks the size of actor._preparationWarnings rather than context.warnings. Since context is available when this occurs in _onRender it should be a simple change to swap over.
The actor sheets populates
context.warningswith a copy of the preparation warnings to render them on the sheet. Adding warnings during sheet preparation works so long as there are existing warnings, but if the actor doesn't contain any warnings at the start then the warning button won't appear in the header because it checks the size ofactor._preparationWarningsrather thancontext.warnings. Since context is available when this occurs in_onRenderit should be a simple change to swap over.