Skip to content

Commit eeba74d

Browse files
authored
Merge pull request #405 from De-Panther/unity6_colorspace
Adapt Color Space warning to Unity 6 and up
2 parents 253b47f + 07564be commit eeba74d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Packages/webxr/CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
### Changed
10-
- Added support for WebAssembly Table, to support newer Unity versions features.
9+
### Added
10+
- Support for WebAssembly Table, to support newer Unity versions features.
11+
12+
### Fixed
13+
- Adapt Color Space warning to Unity 6 and up.
1114

1215
## [0.22.0] - 2024-02-25
1316
### Added

Packages/webxr/Editor/WebXRBuildProcessor.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,19 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse
9898
using Built-in Render Pipeline might cause issues.");
9999
}
100100
#endif
101+
#if UNITY_6000_0_OR_NEWER
102+
if (PlayerSettings.colorSpace != ColorSpace.Linear)
103+
{
104+
Debug.LogWarning(@"WebXR Export requires Linear Color Space,
105+
using Gamma Color Space might cause issues.");
106+
}
107+
#else
101108
if (PlayerSettings.colorSpace != ColorSpace.Gamma)
102109
{
103110
Debug.LogWarning(@"WebXR Export requires Gamma Color Space,
104111
using Linear Color Space might cause issues.");
105112
}
113+
#endif
106114
}
107115
}
108116
}

0 commit comments

Comments
 (0)