Localization.RegisterForTranslation() used for translations relies on LocString.CreateLocStringKeys() to find all LocString fields for translation.
CreateLocStringKeys() requires LocStrings to be static, when they are not, the game crashes with "TargetException: Non-static field requires a target" error.
Recently, beta branch added public LocString fields to ComplexFabricator for SideScreen text. Those are non-static and cause the above exception when something using ComplexFabricator class is subjected to translation attempt. The crashing issue does not appear on live branch, the fields are not there yet.
Moving new fields to STRINGS should resolve the issue
Thanks
(in the logs you will see that the crash is caused by mods. However, investigating the issue shows that the crash happens only when the mod tries to translate classes that inherit from ComplexFabricator)
1. Go to ComplexFabricator class
2. See that there are 2 public LocString fields
- 2
- 2
A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now