Open Georodin opened 2 years ago
void Start()
{
Type wireless = typeof(SpaceNavigatorWirelessHID);
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(wireless.TypeHandle);
Type wired = typeof(SpaceNavigatorHID);
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(wired.TypeHandle);
Debug.Log("Called static");
}
I added this manual static constructor call to my Camera script and at least the SMW works now in build mode but when I connect it via wire it again ignores the rotation axis but this time everywhere not only in the build
I am having the same issue too
Hi Georodin,
I am pretty new to programming and tried to implement your solution for making the Wireless Spacemouse work in BuildMode. However I am struggling with the script, the "Type" wireless is screaming at me.. Could you provide more information about how to implement your solution? I and my architecture studies would be deeply grateful. Thanks
Hihi nilmother,
so that your script can use the Type
thingy you need
using System;
using System.Reflection;
these both at the top of you script
those are called namespaces and tell the compiler where to look for Type
because sometimes you can have ambiguity within names
and the only thing im doing is finding the constructor of the SpaceNavigatorWirelessHID
and call it manually because it's not
called automatically
but the then constructed Object is needed to get Inputs from the SpaceNavigator
if it's something else, then let me know
Dear Georodin, it works, thank you so much!!!
Describe the bug
SpaceNavigatorHID.current.Rotation.ReadValue();
returns in Standalone build onlyVector3(0, 0, 0);
When use in GameMode it works fine. AlsoSpaceNavigatorHID.current.Translation.ReadValue();
still returns all values in all modes just rotation returns zero values using the 3Dconnexion wireless version in Unity 2020.3.5f1 using SpaceNavigator-2.0.0-beta.7To Reproduce Steps to reproduce the behavior:
SpaceNavigatorHID.current.Rotation.ReadValue();
SpaceNavigatorHID.current.Rotation.ReadValue();
andSpaceNavigatorHID.current.Translation.ReadValue();
SpaceNavigatorHID.current.Translation.ReadValue();
returns values whileSpaceNavigatorHID.current.Rotation.ReadValue();
only returnsVector3(0, 0, 0);
constantlyExpected behavior
SpaceNavigatorHID.current.Rotation.ReadValue();
should return values other than zero in builded versionsDetails (please complete the following information):
Additional context Add any other context about the problem here.