Is the empty VisionOSAppController necessary?

The com.unity.xr.visionos package includes a VisionOSAppController.mm with a completely empty override of UnityAppController. This conflicts with an older plugin we are trying to implement into our project, which also uses the UnityAppController subclass override technique.

Can the VisionOSAppController.mm be safely removed? If not, is there documentation somewhere on how to properly update a plugin that uses the Unity App Controller subclass override technique so it can hook necessary calls without conflicting with the empty VisionOSAppController version?

Hey there! VisionOSAppController.mm is from an earlier version of visionOS support, and can probably be safely removed. I haven’t tried this yet, so I’m not sure, but as you say, it is empty and likely has no effect. Can you try removing/modifying it to implement your plugin and let us know how it goes?

Thanks, @mtschoen. I did remove the file and everything still builds and runs on the device; however, I didn’t want to add yet another workaround to our build processes so I updated the old plugin to use method swizzling for the UnityAppController+ViewHandling createUnityView call instead.

1 Like

Makes sense. I’ve added a ticket to our bug tracker to remind me to remove this file in a future release. :+1:
Thanks for bringing this to our attention.

1 Like