Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DisableInputSystemTest : MonoBehaviour
- {
- private IMixedRealityInputSystem inputSystem = null;
- private IMixedRealityInputSystem InputSystem
- {
- get
- {
- if (inputSystem == null)
- {
- MixedRealityServiceRegistry.TryGetService<IMixedRealityInputSystem>(out inputSystem);
- }
- return inputSystem;
- }
- }
- public void DisableInputSystem()
- {
- InputSystem.Disable();
- }
- public void EnableInputSystem()
- {
- InputSystem.Enable();
- }
- }
- MixedRealityInputSystemProfile profile = ConfigurationProfile as MixedRealityInputSystemProfile;
- if (profile.PointerProfile != null)
- {
- if (profile.PointerProfile.GazeProviderType?.Type != null)
- {
- GazeProvider = CameraCache.Main.gameObject.EnsureComponent(profile.PointerProfile.GazeProviderType.Type) as IMixedRealityGazeProvider;
- GazeProvider.GazeCursorPrefab = profile.PointerProfile.GazeCursorPrefab;
- // Current implementation implements both provider types in one concrete class.
- EyeGazeProvider = GazeProvider as IMixedRealityEyeGazeProvider;
- }
- else
- {
- Debug.LogError("The Input system is missing the required GazeProviderType!");
- return;
- }
- }
- else
- {
- Debug.LogError("The Input system is missing the required Pointer Profile!");
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement