Subsystem class definitions in Mixed Reality OpenXR plugin are all internal. This makes it more cumbersome than it should be implement platform-specific behaviour. i.e. we should be able to do:
if (subsystem is AnchorSubsystem s)
{
// do HL2-specific stuff
}
but instead, we have to do something ugly and error-prone:
if (subsystem.GetType().Name == "AnchorSubsystem")
{
// do HL2-specific stuff
}
Please consider exposing subsystem types. I know in this plugin platform-specific members are not typically added on the subsystem class directly (and have in some cases been exposed via e.g. extension methods), but this is still nice pattern to enable with no downside.
By comparison, com.unity.xr.meta-openxr declares all its AR subsystem types as public.
Thank you for the feedback. Unfortunately, this is not something we are able to expose at this time. We will track this feedback internally, and let you know if this changes in the future.
Subsystem class definitions in Mixed Reality OpenXR plugin are all internal. This makes it more cumbersome than it should be implement platform-specific behaviour. i.e. we should be able to do:
but instead, we have to do something ugly and error-prone:
Please consider exposing subsystem types. I know in this plugin platform-specific members are not typically added on the subsystem class directly (and have in some cases been exposed via e.g. extension methods), but this is still nice pattern to enable with no downside.
By comparison, com.unity.xr.meta-openxr declares all its AR subsystem types as public.