diff --git a/com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerPassthroughAPI.cs b/com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerPassthroughAPI.cs index 91ba06a..3280074 100644 --- a/com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerPassthroughAPI.cs +++ b/com.htc.upm.vive.openxr/Runtime/CompositionLayer/Scripts/CompositionLayerPassthroughAPI.cs @@ -415,6 +415,9 @@ public static bool DestroyPassthrough(int passthroughID) #endif #if UNITY_ANDROID return passthroughFeature.HTCPassthrough_DestroyPassthrough(passthroughID); +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif } @@ -473,6 +476,9 @@ public static bool SetPassthroughAlpha(int passthroughID, float alpha, bool auto } else return false; +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif } @@ -544,6 +550,9 @@ public static bool SetProjectedPassthroughMesh(int passthroughID, [In, Out] Vect //Note: Ignore Clock-Wise definition of index buffer for now as passthrough extension does not have back-face culling #if UNITY_ANDROID return passthroughFeature.HTCPassthrough_SetMesh(passthroughID, (uint)vertexBuffer.Length, vertexBufferXrVector, (uint)indexBuffer.Length, indexBufferUint); ; +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif } @@ -622,6 +631,9 @@ public static bool SetProjectedPassthroughMeshTransform(int passthroughID, Proje #endif #if UNITY_ANDROID return passthroughFeature.HTCPassthrough_SetMeshTransform(passthroughID, passthroughFeature.GetXrSpaceFromSpaceType(spaceType), meshXrPose, meshXrScale); +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif } @@ -662,6 +674,9 @@ public static bool SetPassthroughLayerType(int passthroughID, LayerType layerTyp return passthroughFeature.HTCPassthrough_SetLayerType(passthroughID, layerType, compositionDepth); #endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; +#endif } /// @@ -701,6 +716,9 @@ public static bool SetProjectedPassthroughSpaceType(int passthroughID, Projected #endif #if UNITY_ANDROID return passthroughFeature.HTCPassthrough_SetMeshTransformSpace(passthroughID, passthroughFeature.GetXrSpaceFromSpaceType(spaceType)); +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif } @@ -763,6 +781,9 @@ public static bool SetProjectedPassthroughMeshPosition(int passthroughID, Vector #endif #if UNITY_ANDROID return passthroughFeature.HTCPassthrough_SetMeshTransformPosition(passthroughID, OpenXRHelper.ToOpenXRVector(trackingSpaceMeshPosition, convertFromUnityToOpenXR)); +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif } @@ -825,6 +846,9 @@ public static bool SetProjectedPassthroughMeshOrientation(int passthroughID, Qua #endif #if UNITY_ANDROID return passthroughFeature.HTCPassthrough_SetMeshTransformOrientation(passthroughID, OpenXRHelper.ToOpenXRQuaternion(trackingSpaceMeshRotation, convertFromUnityToOpenXR)); +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif } @@ -866,6 +890,9 @@ public static bool SetProjectedPassthroughScale(int passthroughID, Vector3 meshS #if UNITY_ANDROID return passthroughFeature.HTCPassthrough_SetMeshTransformScale(passthroughID, OpenXRHelper.ToOpenXRVector(meshScale, false)); +#endif +#if !UNITY_ANDROID && !UNITY_STANDALONE + return false; #endif }