Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Copyright (c) Mixed Reality Toolkit Contributors
// Licensed under the BSD 3-Clause

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using MixedReality.Toolkit.Input;
using MixedReality.Toolkit.UX;
using TMPro;
using UnityEngine;
Expand All @@ -30,10 +26,8 @@ public class SystemKeyboardExample : MonoBehaviour
[SerializeField]
private TextMeshPro debugMessage = null;

#pragma warning disable 0414
[SerializeField]
private KeyboardPreview mixedRealityKeyboardPreview = null;
#pragma warning restore 0414

/// <summary>
/// Opens a platform specific keyboard.
Expand All @@ -43,15 +37,18 @@ public void OpenSystemKeyboard()
#if WINDOWS_UWP
wmrKeyboard.ShowKeyboard(wmrKeyboard.Text, false);
#elif UNITY_IOS || UNITY_ANDROID
touchscreenKeyboard = TouchScreenKeyboard.Open(string.Empty, TouchScreenKeyboardType.Default, false, false, false, false);
if (TouchScreenKeyboard.isSupported)
{
touchscreenKeyboard = TouchScreenKeyboard.Open(string.Empty, TouchScreenKeyboardType.Default, false, false, false, false);
}
#endif
}

#region MonoBehaviour Implementation

/// <summary>
/// A Unity event function that is called on the frame when a script is enabled just before any of the update methods are called the first time.
/// </summary>
/// </summary>
private void Start()
{
// Initially hide the preview.
Expand Down Expand Up @@ -91,7 +88,6 @@ private void Start()
#endif
}


#if WINDOWS_UWP
/// <summary>
/// A Unity event function that is called every frame, if this object is enabled.
Expand Down Expand Up @@ -149,19 +145,19 @@ private void Update()
// touch screen keyboard.
if (touchscreenKeyboard != null)
{
string KeyboardText = touchscreenKeyboard.text;
string keyboardText = touchscreenKeyboard.text;
if (TouchScreenKeyboard.visible)
{
if (debugMessage != null)
{
debugMessage.text = "typing... " + KeyboardText;
debugMessage.text = "typing... " + keyboardText;
}
}
else
{
if (debugMessage != null)
{
debugMessage.text = "typed " + KeyboardText;
debugMessage.text = "typed " + keyboardText;
}

touchscreenKeyboard = null;
Expand All @@ -173,4 +169,3 @@ private void Update()
#endregion MonoBehaviour Implementation
}
}
#pragma warning restore CS1591
4 changes: 2 additions & 2 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.8)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
base64 (0.3.0)
bigdecimal (3.3.1)
Expand Down Expand Up @@ -66,7 +66,7 @@ GEM
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (7.0.0)
public_suffix (7.0.5)
rake (13.3.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
Expand Down
9 changes: 8 additions & 1 deletion org.mixedrealitytoolkit.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Added

* Added new `editorDefault` field for debugging the various `DisplayType`s in-editor. [PR #1130](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1130)
* Added edit mode tests for `AssemblyExtensions`, `SystemType`, and `SerializableDictionary`. [PR #1122](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1122)

### Changed

* Updated `PackageValidator` to only be valid if `UNITY_EDITOR` is true. [PR #1125](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1125)
* `AssemblyExtensions.GetLoadableTypes` now throws `ArgumentNullException` when called on a null assembly instead of `NullReferenceException`. [PR #1122](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1122)
* Updated `MRTKBaseInteractable` to follow MRTK style. [PR #1073](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1073)

## [4.0.0-pre.3] - 2026-05-20

Expand All @@ -21,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

### Fixed

* Fixed "The type MixedReality.Toolkit.Core MixedReality.Toolkit.Experimental.BubbleChildHoverEvents/TrickleChildHoverEvents/BubbleChildSelectEvents/TrickleChildSelectEvents is being serialized by `[SerializeReference]`, but is missing the `[Serializable]` attribute." on Unity 6.3. [PR #1107](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1107)
* Fixed "The type `MixedReality.Toolkit.Core MixedReality.Toolkit.Experimental.BubbleChildHoverEvents/TrickleChildHoverEvents/BubbleChildSelectEvents/TrickleChildSelectEvents` is being serialized by `[SerializeReference]`, but is missing the `[Serializable]` attribute." on Unity 6.3. [PR #1107](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1107)

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
{
#region Gaze

readonly List<IGazeInteractor> hoveringGazeInteractors = new List<IGazeInteractor>();
private readonly List<IGazeInteractor> hoveringGazeInteractors = new List<IGazeInteractor>();

/// <summary>
/// (Read Only) The list of <see cref="IGazeInteractor"/> components currently gazing this object.
Expand All @@ -30,14 +30,14 @@ public class MRTKBaseInteractable : XRBaseInteractable

#region GazePinch

readonly List<IGazePinchInteractor> hoveringGazePinchInteractors = new List<IGazePinchInteractor>();
private readonly List<IGazePinchInteractor> hoveringGazePinchInteractors = new List<IGazePinchInteractor>();

/// <summary>
/// (Read Only) The list of <see cref="IGazePinchInteractor"/> components currently hovering this object.
/// </summary>
public List<IGazePinchInteractor> HoveringGazePinchInteractors => hoveringGazePinchInteractors;

readonly List<IGazePinchInteractor> selectingGazePinchInteractors = new List<IGazePinchInteractor>();
private readonly List<IGazePinchInteractor> selectingGazePinchInteractors = new List<IGazePinchInteractor>();

/// <summary>
/// (Read Only) The list of <see cref="IGazePinchInteractor"/> components currently selecting this object.
Expand All @@ -48,7 +48,7 @@ public class MRTKBaseInteractable : XRBaseInteractable

#region Poke

readonly List<IPokeInteractor> hoveringPokeInteractors = new List<IPokeInteractor>();
private readonly List<IPokeInteractor> hoveringPokeInteractors = new List<IPokeInteractor>();

/// <summary>
/// (Read Only) The list of <see cref="IPokeInteractor"/> components currently hovering this object.
Expand All @@ -59,14 +59,14 @@ public class MRTKBaseInteractable : XRBaseInteractable

#region Grab

readonly List<IGrabInteractor> hoveringGrabInteractors = new List<IGrabInteractor>();
private readonly List<IGrabInteractor> hoveringGrabInteractors = new List<IGrabInteractor>();

/// <summary>
/// (Read Only) The list of <see cref="IGrabInteractor"/> components currently hovering this object.
/// </summary>]
public List<IGrabInteractor> HoveringGrabInteractors => hoveringGrabInteractors;

readonly List<IGrabInteractor> selectingGrabInteractors = new List<IGrabInteractor>();
private readonly List<IGrabInteractor> selectingGrabInteractors = new List<IGrabInteractor>();

/// <summary>
/// (Read Only) The list of <see cref="IGrabInteractor"/> components currently selecting this object.
Expand All @@ -77,7 +77,7 @@ public class MRTKBaseInteractable : XRBaseInteractable

#region Ray

readonly List<IRayInteractor> hoveringRayInteractors = new List<IRayInteractor>();
private readonly List<IRayInteractor> hoveringRayInteractors = new List<IRayInteractor>();

/// <summary>
/// (Read Only) The list of <see cref="IRayInteractor"/> components currently hovering this object.
Expand All @@ -95,7 +95,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object selected by a gaze-pinch interactor?
/// </summary>
public TimedFlag IsGazePinchSelected { get => isGazePinchSelected; }
public TimedFlag IsGazePinchSelected => isGazePinchSelected;

[SerializeField]
[Tooltip("Is this object selected by a non-gaze ray interactor?")]
Expand All @@ -104,7 +104,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object selected by a non-gaze ray interactor?
/// </summary>
public TimedFlag IsRaySelected { get => isRaySelected; }
public TimedFlag IsRaySelected => isRaySelected;

[SerializeField]
[Tooltip("Is this object selected by a poke interactor?")]
Expand All @@ -113,7 +113,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object selected by a poke interactor?
/// </summary>
public TimedFlag IsPokeSelected { get => isPokeSelected; }
public TimedFlag IsPokeSelected => isPokeSelected;

[SerializeField]
[Tooltip("Is this object selected by a grab interactor?")]
Expand All @@ -122,7 +122,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object selected by a grab interactor?
/// </summary>
public TimedFlag IsGrabSelected { get => isGrabSelected; }
public TimedFlag IsGrabSelected => isGrabSelected;

[SerializeField]
[Tooltip("Is this object hovered by any gaze interactor?")]
Expand All @@ -131,7 +131,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object hovered by any gaze interactor?
/// </summary>
public TimedFlag IsGazeHovered { get => isGazeHovered; }
public TimedFlag IsGazeHovered => isGazeHovered;

[SerializeField]
[Tooltip("Is this object hovered by a gaze-pinch interactor?")]
Expand All @@ -140,7 +140,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object hovered by a gaze-pinch interactor?
/// </summary>
public TimedFlag IsGazePinchHovered { get => isGazePinchHovered; }
public TimedFlag IsGazePinchHovered => isGazePinchHovered;

[SerializeField]
[Tooltip("Is this object hovered by a non-gaze ray interactor?")]
Expand All @@ -149,7 +149,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object hovered by a non-gaze ray interactor?
/// </summary>
public TimedFlag IsRayHovered { get => isRayHovered; }
public TimedFlag IsRayHovered => isRayHovered;

[SerializeField]
[Tooltip("Is this object hovered by a grab interactor?")]
Expand All @@ -158,7 +158,7 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object hovered by a grab interactor?
/// </summary>
public TimedFlag IsGrabHovered { get => isGrabHovered; }
public TimedFlag IsGrabHovered => isGrabHovered;

[SerializeField]
[Tooltip("Is this object hovered by a near touch/poke interactor?")]
Expand All @@ -168,12 +168,12 @@ public class MRTKBaseInteractable : XRBaseInteractable
/// <summary>
/// Is this object hovered by a near touch/poke interactor?
/// </summary>
public TimedFlag IsPokeHovered { get => isPokeHovered; }
public TimedFlag IsPokeHovered => isPokeHovered;

/// <summary>
/// Is this object hovered by any interactor other than passive targeting interactors?
/// </summary>
public TimedFlag IsActiveHovered { get => isActiveHovered; }
public TimedFlag IsActiveHovered => isActiveHovered;

[SerializeField]
[Tooltip("Is this object hovered by any interactor other than only passive targeting interactors?")]
Expand Down Expand Up @@ -201,7 +201,7 @@ public void DisableInteractorType(SystemInterfaceType type)
}
}
/// <summary>
/// Removes the specified type to the set of interactors which cannot select this interactable
/// Removes the specified type from the set of interactors which cannot select this interactable
/// </summary>
public void EnableInteractorType(SystemInterfaceType type)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright (c) Mixed Reality Toolkit Contributors
// Licensed under the BSD 3-Clause

using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace MixedReality.Toolkit.Core.Tests.EditMode
{
/// <summary>
/// Unit tests for AssemblyExtensions.
/// These run outside of PlayMode and do not require Unity engine initialization.
/// </summary>
public class AssemblyExtensionsTests
{
[Test]
public void GetLoadableTypes_ReturnsTypes_ForValidAssembly()
{
Assembly currentAssembly = Assembly.GetExecutingAssembly();

IEnumerable<Type> types = currentAssembly.GetLoadableTypes();

Assert.IsNotNull(types, "GetLoadableTypes should never return null.");
Assert.Greater(types.Count(), 0, "GetLoadableTypes should return the types within the executing assembly.");
Assert.IsTrue(types.Contains(typeof(AssemblyExtensionsTests)), "GetLoadableTypes failed to return known loadable types.");
}

[Test]
public void GetLoadableTypes_HandlesNullAssembly_Safely()
{
Assembly nullAssembly = null;
Assert.Throws<ArgumentNullException>(() => nullAssembly.GetLoadableTypes());
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading