Skip to content

Conversation

@Dessix
Copy link

@Dessix Dessix commented Jan 15, 2022

OpenVRSettings rewrites the Assets/XR/Settings/Open VR Settings.asset on project startup; it continues where the original fix to #11 left off.

This change avoids inconsistent serialization across platforms, preventing VCS conflicts between team-members across Linux / Windows / Mac editor targets.

As the Unity built-in VCS integration does not understand the concept of path equivalence, this avoids conflicts in naive "sync" workflows and unnecessary differences in working trees.

Serialized formats for cross-platform files should not use System.IO.Path.DirectorySeparatorChar unless they replace it during encoding and substitute the consistent variant during decoding. As all target platforms for the editor support forward-slash paths, a constant avoids the whole issue.

Additionally, this PR:

  • Eliminates an unnecessary side-effect-free computation of a new path when not in the editor
  • Corrects inconsistent usage of indentation (Awake was indented with tabs while the rest was spaces)

`OpenVRSettings` rewrites the `Assets/XR/Settings/Open VR Settings.asset` on project startup; it continues where the original fix to ValveSoftware#11 left off.

This change avoids inconsistent serialization across platforms, preventing VCS conflicts between team-members across Linux / Windows / Mac editor targets.

As the Unity built-in VCS integration does not understand the concept of path equivalence, this avoids conflicts in naive "sync" workflows and unnecessary differences in working trees.

Serialized formats for cross-platform files should not use `System.IO.Path.DirectorySeparatorChar` unless they replace it during encoding and substitute the consistent variant during decoding. As all target platforms for the editor support forward-slash paths, a constant avoids the whole issue.


Additionally, this PR:
- Eliminates an unnecessary side-effect-free computation of a new path when not in the editor
- Corrects inconsistent usage of indentation (`Awake` was indented with tabs while the rest was spaces)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant