glTFast
glTFast copied to clipboard
Compile Error occurs when applying "GLTFAST_SAFE" Script Define Symbols
Describe the bug I have been loading gltf models using GLTFast, and have enabled Safe Mode according to the ProjectSetup guide. (Otherwise joint normalization issues will occur). However, after glTFast v6.0.0, if Safe Mode is enabled, the Compile Error occurs This is a serious problem and can hinder development progress. Please fix it quickly.
To Reproduce Steps to reproduce the behavior:
- Import glTFast v6.0.0 and higher into Unity project.
- To enable Safe Mode, enter “GLTFAST_SAFE” in Script Define Symbols and apply.
- Check the error message “The name ‘accessors’ does not exist in the current context” as a compile error.
Expected behavior Safe Mode should work normally without compilation errors as in versions prior to glTFast v6.0.0.
Screenshots


Desktop (please complete the following information):
- glTFast version: v6.0.0 and higher
- Unity Editor version: 2022.2.2f1
- Render Pipeline and version: Built In
- Platform: Window
additionally (if significant for the bug):
- Device: Galaxy
- OS: n/a
- For WebGL: n/a
Hi,
I don't have time to create a fully fledged fix for this, but we just noticed this as well. Nevertheless still want to provide the information below - Maybe it helps someone in the future:
The non-generic RootBase class has an uppercase abstract property called Accessors, whereas the generic Rootbase has a lowercase field called accessors. A fix should be as simple as at line 574 to 578 changing to access the Accessors property instead of the accessors field.