Skip to content
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

### Long Term Support

* Minimum requirements: OpenXR, Unity 2022.3 LTS, Unity’s XR Interaction Toolkit 3.0.
* Minimum requirements: OpenXR, Unity 6.0 LTS, Unity’s XR Interaction Toolkit 3.0.

## Packages

Expand Down
90 changes: 0 additions & 90 deletions UnityProjects/.gitignore

This file was deleted.

108 changes: 108 additions & 0 deletions UnityProjects/MRTKDevTemplate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
#
.utmp/
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
*.log

# By default unity supports Blender asset imports, *.blend1 blender files do not need to be commited to version control.
*.blend1
*.blend1.meta

# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Recordings can get excessive in size
/[Rr]ecordings/

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
# Jetbrains Rider personal-layer settings
*.DotSettings.user

# Visual Studio cache directory
.vs/

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.slnx
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D generated file on crash reports
sysinfo.txt

# Mono auto generated files
mono_crash.*

# Builds
*.apk
*.aab
*.unitypackage
*.unitypackage.meta
*.app

# Crashlytics generated file
crashlytics-build.properties

# TestRunner generated files
InitTestScene*.unity*

# Addressables default ignores, before user customizations
/ServerData
/[Aa]ssets/StreamingAssets/aa*
/[Aa]ssets/AddressableAssetsData/link.xml*
/[Aa]ssets/Addressables_Temp*
# By default, Addressables content builds will generate addressables_content_state.bin
# files in platform-specific subfolders, for example:
# /Assets/AddressableAssetsData/OSX/addressables_content_state.bin
/[Aa]ssets/AddressableAssetsData/*/*.bin*

# Visual Scripting auto-generated files
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db.meta
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers.meta

# Auto-generated scenes by play mode tests
/[Aa]ssets/[Ii]nit[Tt]est[Ss]cene*.unity*

# Project Specific List
/[Aa]ssets/[Bb]uild[Rr]eports*
/[Aa]ssets/[Oo]culus*
/[Aa]ssets/[Ss]amples*
/[Aa]ssets/TextMesh Pro*
*.pfx
*.pfx.meta
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,10 @@ private static void PatchHands(bool addDebug)
visualizer.JointMaterial = AssetDatabase.LoadAssetAtPath<Material>(AssetDatabase.GUIDToAssetPath(HandJointMaterialGuid));
visualizer.JointMesh = Resources.GetBuiltinResource<Mesh>("Cube.fbx");
}
#if UNITY_6000_0_OR_NEWER
else
{
PrefabUtility.RemoveUnusedOverrides(new[] { leftHandVisualizer }, UnityEditor.InteractionMode.UserAction);
}
#endif
PrefabUtility.SaveAsPrefabAsset(leftHandVisualizer, leftHandPath);
}
PrefabUtility.UnloadPrefabContents(leftHandVisualizer);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
// Copyright (c) Mixed Reality Toolkit Contributors
// Licensed under the BSD 3-Clause

#if UNITY_6000_0_OR_NEWER
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
using UnityEngine;
#endif

namespace MixedReality.Toolkit.Examples.Demos.Editor
{
internal class AndroidXRConfig
{
#if UNITY_6000_0_OR_NEWER
private static AddAndRemoveRequest request;

[MenuItem("Mixed Reality/MRTK3/Examples/Configure for Android XR...", priority = int.MaxValue)]
Expand All @@ -38,6 +35,5 @@ private static void Progress()
request = null;
}
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class MoveObjectByEyeGaze : StatefulInteractable
/// Limits the Z position of the GameObject to the specified minimum and maximum.
/// </summary>
public Vector2 LocalMinMaxZ = new Vector2(float.NegativeInfinity, float.PositiveInfinity);

[Tooltip("Fired when the GameObject is dropped.")]
[SerializeField]
private UnityEvent onDrop = null;
Expand All @@ -123,7 +123,7 @@ public class MoveObjectByEyeGaze : StatefulInteractable

private bool
onlyEyeWarpOnRelease =
true; // Only warp the currently grabbed target to the current look at location once the user releases the pinch gesture.
true; // Only warp the currently grabbed target to the current look at location once the user releases the pinch gesture.

private float originalTransparency = -1f;
private bool originalUseGravity = false;
Expand Down Expand Up @@ -366,13 +366,13 @@ private bool IsLookingAwayFromTarget()
// Check whether the user is still looking within the proximity of the target
float distanceBetweenTargetAndCurrHitPos = Angle_ToCurrHitTarget(gameObject);

// **Note for potential improvement**: It would be better to make this dependent on the target's boundary
// **Note for potential improvement**: It would be better to make this dependent on the target's boundary
// instead of its center. The way it is implemented right now may cause problems for large-scale targets.
return distanceBetweenTargetAndCurrHitPos > minLookAwayDistToEnableEyeWarp;
}

/// <summary>
/// Determine whether the user is looking away from the preview.
/// Determine whether the user is looking away from the preview.
/// </summary>
private bool IsLookingAwayFromPreview()
{
Expand Down Expand Up @@ -405,7 +405,7 @@ private bool IsLookingAwayFromPreview()

/// <summary>
/// Check if the destination is plausible. For example, this means if the target is placeable
/// on horizontal surfaces then only show a preview for (more or less) horizontal surfaces.
/// on horizontal surfaces then only show a preview for (more or less) horizontal surfaces.
/// </summary>
/// <returns>True if the target can be placed on this surface.</returns>
private bool IsDestinationPlausible()
Expand Down Expand Up @@ -490,13 +490,8 @@ private void DragAndDrop_Start()
originalUseGravity = rigidbody.useGravity;
rigidbody.useGravity = false;

#if UNITY_6000_0_OR_NEWER
originalDrag = rigidbody.linearDamping;
rigidbody.linearDamping = float.PositiveInfinity;
#else
originalDrag = rigidbody.drag;
rigidbody.drag = float.PositiveInfinity;
#endif
}
}
}
Expand Down Expand Up @@ -525,11 +520,7 @@ private void DragAndDrop_Finish()
if (TryGetComponent<Rigidbody>(out var rigidbody))
{
rigidbody.useGravity = originalUseGravity;
#if UNITY_6000_0_OR_NEWER
rigidbody.linearDamping = originalDrag;
#else
rigidbody.drag = originalDrag;
#endif
}

onDrop.Invoke();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace MixedReality.Toolkit.Examples.Demos
{
/// <summary>
/// Helper script to re-spawn objects if they go too far from their original position.
/// Helper script to re-spawn objects if they go too far from their original position.
/// </summary>
/// <remarks>
/// The helper is useful for objects that will fall forever.
Expand All @@ -28,7 +28,7 @@ internal class TetheredPlacement : MonoBehaviour

/// <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()
{
rigidBody = GetComponent<Rigidbody>();
Expand All @@ -49,11 +49,7 @@ private void LateUpdate()
// Reset any velocity from falling or moving when re-spawning to original location
if (rigidBody != null)
{
#if UNITY_6000_0_OR_NEWER
rigidBody.linearVelocity = Vector3.zero;
#else
rigidBody.velocity = Vector3.zero;
#endif
rigidBody.angularVelocity = Vector3.zero;
}

Expand All @@ -63,4 +59,4 @@ private void LateUpdate()
}
}
}
#pragma warning restore CS1591
#pragma warning restore CS1591
Loading