What is the platform scripting symbols for VisionOS?

Are there any platform scripting symbols for VisionOS, e.g. #if UNITY_VISIONOS?

Yes, and in fact that is the scripting symbol define exactly.

1 Like

Is there a scripting symbol for Polyspatial?


I am not aware of any explicit scripting symbol for PolySpatial, but if you wanted to selectively compile code based on whether PolySpatial is active, you could use version defines in your assembly definitions.

Hope that helps!


Thank you! I didn’t know that.
It’s very useful that we ca define scripting symbols based on Unity package existence.

Is there support for custom scripting symbols for conditional compilation on VisionOS? I feel like the answer is an obvious ‘yes’, but I have come across other surprises so far.

actually i am confused, is UNITY_VISIONOS not the same as polyspatial?

No, you can build for VisionOS and not use PolySpatial at all.