Skip to content

CompositionLayerPassthroughAPI: return false on non-Android/Standalone#36

Open
aaronaccessvr wants to merge 1 commit into
ViveSoftware:masterfrom
AccessVR:master
Open

CompositionLayerPassthroughAPI: return false on non-Android/Standalone#36
aaronaccessvr wants to merge 1 commit into
ViveSoftware:masterfrom
AccessVR:master

Conversation

@aaronaccessvr
Copy link
Copy Markdown

The 9 passthrough API methods that branch on #if UNITY_ANDROID and #if UNITY_STANDALONE had no fallback for other active build targets (notably iOS), so they tripped CS0161 ('not all code paths return a value') whenever an iOS or visionOS target was active. Added a #if !UNITY_ANDROID && !UNITY_STANDALONE return false; fallback per method so the file compiles cleanly across all platforms while preserving the Android and Standalone runtime behavior unchanged.

Affects:

  • DestroyPassthrough(int)
  • SetPassthroughAlpha(int, float, bool)
  • SetProjectedPassthroughMesh(int, Vector3[], int[], bool)
  • SetProjectedPassthroughMeshTransform(...)
  • SetPassthroughLayerType(int, LayerType, uint)
  • SetProjectedPassthroughSpaceType(int, ProjectedPassthroughSpaceType)
  • SetProjectedPassthroughMeshPosition(...)
  • SetProjectedPassthroughMeshOrientation(...)
  • SetProjectedPassthroughScale(int, Vector3)

The 9 passthrough API methods that branch on #if UNITY_ANDROID and
#if UNITY_STANDALONE had no fallback for other active build targets
(notably iOS), so they tripped CS0161 ('not all code paths return a
value') whenever an iOS or visionOS target was active. Added a
#if !UNITY_ANDROID && !UNITY_STANDALONE return false; fallback per
method so the file compiles cleanly across all platforms while
preserving the Android and Standalone runtime behavior unchanged.

Affects:
- DestroyPassthrough(int)
- SetPassthroughAlpha(int, float, bool)
- SetProjectedPassthroughMesh(int, Vector3[], int[], bool)
- SetProjectedPassthroughMeshTransform(...)
- SetPassthroughLayerType(int, LayerType, uint)
- SetProjectedPassthroughSpaceType(int, ProjectedPassthroughSpaceType)
- SetProjectedPassthroughMeshPosition(...)
- SetProjectedPassthroughMeshOrientation(...)
- SetProjectedPassthroughScale(int, Vector3)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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