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.
This PR has two relatively simple changes;
IGLTFSceneExportGuard - this interface allows a MonoBehaviour on a GameObject to mark a portion of the transform hierarchy as unexportable, which allows us to easily indicate that portions of a scene are for business logic only and not visible objects, without having to create new layers and/or adjust tags. I've also included GLTFSceneExportGuard which is an empty MonoBehaviour purely for convenience when using this feature within the editor.
On line 970, there's a check for _exportLayerMask >= 0. I assume this was written with the assumption that an empty layer mask would be nonsensical and the exporter should just default to all layers. However, if layer 31 is enabled, this sets the sign bit on the underlying int, which will make the layer mask negative, and it'll therefore fail this check. I've switched this to _exportLayerMask != 0.
Both of these changes have been tested by us internally. Please take a look - thanks!