Hello! I’ve found that ML developers are somehow hiding a feature who has been requested by a lot but never added to documentation! (Like “if you are able to find it, then you are good to go with it”). If this is the case, consider deleting this topic @kbabilinski
Unity Editor version: 6000.0.51f1
ML2 OS version: 1.12.0
Unity SDK version: 2.6.0
Host OS: (Windows/MacOS): Windows 11 Home (latest?)
Intro:
It was more than one time (here and here) requested if it is possible to disable enforcement for near clipping plane (reccomended at 0.37m, minimum at 0.25m).
The thing is, YEAH IT IS POSSIBLE!
I discovered it by searching where it is enforced, and with openXR implementation you can find inside “MagicLeap.SDK>Library>…>MagicLeapFeature>MagicLeapFeature.cs” that a “None” implementation has been done for Near Clip Enforcement. It is enclosed inside an IF_DEFINE, so it is only a matter of:
Short Solution:
- Inside Player Settings add the Scripting Define Symbol:
< DISABLE_MAGICLEAP_CLIP_ENFORCEMENT >
1bis. Then pay attention that some features could be reset (in my case was “MarkerUnderstanding”) from the enabled OpenXR features. - Click on the Gear next to the “Magic Leap Support” OpenXR feature and now you are able to select “None” from the Near Clip Enforcement Policy
- Change in your XR Rig’s Camera Near/Far clipping plane values as desired.
Remember always that it is suggested to not make it lower than 0.37m, but maybe there are situation in which optical fatigue is addressed in another way (maybe being sure of not having sharp and detailed objects too near the eyes, and maybe even not too much!).
I hope this can be useful for developers who want to test new possibilities, having more freedom or whatever else ![]()