Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable non xr use for zinnia #552

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fight4dream
Copy link
Contributor

not to be merged directly

both XRNodeHapticPulser and XRNodeVelocityEstimator uses XRNode for serialized property,
cannot be modified readily to ignore those properties without losing the serialized data.
I chose to complete #if out the components.

PlatformDeviceAssociation (and deprecated LoadedXrDeviceAssociation) uses XRNode, XRDevice, XRSettings
but some of the logic can be ignored, so I chose to #if just those parts.

Zinnia.Runtime.asmdef added versionDefines
XRNode and InputDevices are within com.unity.modules.xr
XRDevice and XRSettings are within com.unity.modules.vr
com.unity.modules.vr depends on com.unity.modules.xr

although technically we would expect them both to be enabled in a vr project,
I chose to make separate define symbols for each of them.

The following Tilia have reference to XR/VR:
"io.extendreality.tilia.camerarigs.spatialsimulator.unity": "1.4.21",
"io.extendreality.tilia.camerarigs.unityxr": "1.5.9",
"io.extendreality.tilia.camerarigs.xrpluginframework.unity": "1.1.10",
"io.extendreality.tilia.output.interactorhaptics.unity": "1.1.34",
"io.extendreality.tilia.sdk.oculusintegration.unity": "1.3.19",
"io.extendreality.tilia.sdk.steamvr.unity": "1.1.22",

not to be merged directly
--------------
both XRNodeHapticPulser and XRNodeVelocityEstimator uses XRNode for serialized property,
cannot be modified readily to ignore those properties without losing the serialized data.
I chose to complete #if out the components.

PlatformDeviceAssociation (and deprecated LoadedXrDeviceAssociation) uses XRNode, XRDevice, XRSettings
but some of the logic can be ignored, so I chose to #if just those parts.
-------------------------------------
Zinnia.Runtime.asmdef added versionDefines
XRNode and InputDevices are within com.unity.modules.xr
XRDevice and XRSettings are within com.unity.modules.vr
com.unity.modules.vr depends on com.unity.modules.xr

although technically we would expect them both to be enabled in a vr project,
I chose to make separate define symbols for each of them.
--------------------------------
The following Tilia have reference to XR/VR:
"io.extendreality.tilia.camerarigs.spatialsimulator.unity": "1.4.21",
"io.extendreality.tilia.camerarigs.unityxr": "1.5.9",
"io.extendreality.tilia.camerarigs.xrpluginframework.unity": "1.1.10",
"io.extendreality.tilia.output.interactorhaptics.unity": "1.1.34",
"io.extendreality.tilia.sdk.oculusintegration.unity": "1.3.19",
"io.extendreality.tilia.sdk.steamvr.unity": "1.1.22",
@fight4dream
Copy link
Contributor Author

@thestonefox these are the basic changes to be made. I am not going to make this pull official as there may be other workarounds or things to be done differently (to support spatial simulator, and interactor haptics (xbox controller for example))

@thestonefox
Copy link
Member

looking over this, these ifdefs basically render a bunch of classes just empty.

What's the benefit of this? these classes can be present in a non-vr app and cause no issue, right?

@thestonefox
Copy link
Member

am i missing something about the serialization of XRNode causing an issue?

@fight4dream
Copy link
Contributor Author

@thestonefox non-vr apps would not have imported com.unity.modules.xr and com.unity.modules.vr packages
and a large part of zinnia/tilia do indeed does not depend on those packages.

without those packages, it would have been compile errors (and thus also serialization issue with XRNode for example)

moreover, the idea that a spatial simulator absolutely independent of those packages could take zinnia and some tilia a competitive candidate for more audience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants