Skip to content

Commit

Permalink
improve mrtk and modify rendering, settings
Browse files Browse the repository at this point in the history
  • Loading branch information
uzumal committed Sep 30, 2022
1 parent 9fe874b commit 1cb7487
Show file tree
Hide file tree
Showing 6,203 changed files with 1,666,547 additions and 257 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions AR-ROS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
/[Ll]ogs/
/[Uu]ser[Ss]ettings/

App/
MixedRealityToolkit.Generated/
MRTK/
TextMesh Pro/
Library/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
Expand Down
8 changes: 8 additions & 0 deletions AR-ROS/Assets/MRTK.meta

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

8 changes: 8 additions & 0 deletions AR-ROS/Assets/MRTK/Core.meta

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

7 changes: 7 additions & 0 deletions AR-ROS/Assets/MRTK/Core/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
[assembly: System.Reflection.AssemblyVersion("2.8.2.0")]
[assembly: System.Reflection.AssemblyFileVersion("2.8.2.0")]

[assembly: System.Reflection.AssemblyProduct("Microsoft® Mixed Reality Toolkit")]
[assembly: System.Reflection.AssemblyCopyright("Copyright © Microsoft Corporation")]
11 changes: 11 additions & 0 deletions AR-ROS/Assets/MRTK/Core/AssemblyInfo.cs.meta

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

8 changes: 8 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes.meta

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

20 changes: 20 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/DocLinkAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;

namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Defines a documentation link for a service.
/// Used primarily by service inspector facades.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
[Obsolete("Use HelpURLAttribute from Unity instead")]
public class DocLinkAttribute : Attribute
{
public DocLinkAttribute(string url) { URL = url; }

public string URL { get; private set; }
}
}
11 changes: 11 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/DocLinkAttribute.cs.meta

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

21 changes: 21 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/EnumFlagsAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using UnityEngine;

namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// An attribute that allows a particular field to be rendered as multi-selectable
/// set of flags.
/// </summary>
/// <remarks>
/// From https://answers.unity.com/questions/486694/default-editor-enum-as-flags-.html
/// </remarks>
[AttributeUsage(AttributeTargets.Field)]
public sealed class EnumFlagsAttribute : PropertyAttribute
{
public EnumFlagsAttribute() { }
}
}
11 changes: 11 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/EnumFlagsAttribute.cs.meta

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

36 changes: 36 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/ExperimentalAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using UnityEngine;

namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// A PropertyAttribute for showing a warning box that the tagged implementation is experimental.
/// </summary>
[AttributeUsage(AttributeTargets.Field, Inherited = true)]
public class ExperimentalAttribute : PropertyAttribute
{
/// <summary>
/// The text to display in the warning box.
/// </summary>
public string Text;

private const string defaultText = "<b><color=yellow>This is an experimental feature.</color></b>\n" +
"Parts of the MRTK appear to have a lot of value even if the details " +
"haven’t fully been fleshed out. For these types of features, we want " +
"the community to see them and get value out of them early. Because " +
"they are early in the cycle, we label them as experimental to indicate " +
"that they are still evolving, and subject to change over time.";

/// <summary>
/// Constructor.
/// </summary>
/// <param name="experimentalText">The experimental text to display in the warning box.</param>
public ExperimentalAttribute(string experimentalText = defaultText)
{
Text = experimentalText;
}
}
}
11 changes: 11 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/ExperimentalAttribute.cs.meta

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

41 changes: 41 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/ExtendsAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.MixedReality.Toolkit.Utilities;
#if WINDOWS_UWP && !ENABLE_IL2CPP
using Microsoft.MixedReality.Toolkit;
#endif // WINDOWS_UWP && !ENABLE_IL2CPP
using System;

namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Constraint that allows selection of classes that extend a specific class when
/// selecting a <see cref="Utilities.SystemType"/> with the Unity inspector.
/// </summary>
public sealed class ExtendsAttribute : SystemTypeAttribute
{
/// <summary>
/// Gets the type of class that selectable classes must derive from.
/// </summary>
public Type BaseType { get; private set; }

/// <summary>
/// Initializes a new instance of the <see cref="ExtendsAttribute"/> class.
/// </summary>
/// <param name="baseType">Type of class that selectable classes must derive from.</param>
/// <param name="grouping">Gets or sets grouping of selectable classes. Defaults to <see cref="Utilities.TypeGrouping.ByNamespaceFlat"/> unless explicitly specified.</param>
public ExtendsAttribute(Type baseType, TypeGrouping grouping) : base(baseType, grouping)
{
BaseType = baseType;
}

/// <inheritdoc/>
public override bool IsConstraintSatisfied(Type type)
{
return base.IsConstraintSatisfied(type) &&
BaseType.IsAssignableFrom(type) &&
type != BaseType;
}
}
}
11 changes: 11 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/ExtendsAttribute.cs.meta

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

46 changes: 46 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/HelpAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using UnityEngine;

namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// A PropertyAttribute for showing a collapsible Help section.
/// </summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]
public class HelpAttribute : PropertyAttribute
{
/// <summary>
/// The help text
/// </summary>
public string Text;

/// <summary>
/// The help header foldout text
/// </summary>
/// <remarks>
/// If Collapsible is false, then this header text will not be shown.
/// </remarks>
public string Header;

/// <summary>
/// If true, this will be a collapsible help section. Defaults to true.
/// </summary>
public bool Collapsible;

/// <summary>
/// Constructor
/// </summary>
/// <param name="helpText">The help text to display</param>
/// <param name="helpHeader">The help header foldout text</param>
/// <param name="collapsible">If true, this help drawer will be collapsible</param>
public HelpAttribute(string helpText, string helpHeader = "Help", bool collapsible = true)
{
Text = helpText;
Header = helpHeader;
Collapsible = collapsible;
}
}
}
11 changes: 11 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/HelpAttribute.cs.meta

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

51 changes: 51 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/ImplementsAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.MixedReality.Toolkit.Utilities;
#if WINDOWS_UWP && !ENABLE_IL2CPP
using Microsoft.MixedReality.Toolkit;
#endif // WINDOWS_UWP && !ENABLE_IL2CPP
using System;

namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Constraint that allows selection of classes that implement a specific interface
/// when selecting a <see cref="Utilities.SystemType"/> with the Unity inspector.
/// </summary>
public sealed class ImplementsAttribute : SystemTypeAttribute
{
/// <summary>
/// Gets the type of interface that selectable classes must implement.
/// </summary>
public Type InterfaceType { get; private set; }

/// <summary>
/// Initializes a new instance of the <see cref="ImplementsAttribute"/> class.
/// </summary>
/// <param name="interfaceType">Type of interface that selectable classes must implement.</param>
/// <param name="grouping">Gets or sets grouping of selectable classes. Defaults to <see cref="Utilities.TypeGrouping.ByNamespaceFlat"/> unless explicitly specified.</param>
public ImplementsAttribute(Type interfaceType, TypeGrouping grouping) : base(interfaceType, grouping)
{
InterfaceType = interfaceType;
}

/// <inheritdoc />
public override bool IsConstraintSatisfied(Type type)
{
if (base.IsConstraintSatisfied(type))
{
var interfaces = type.GetInterfaces();
for (var i = 0; i < interfaces.Length; i++)
{
if (interfaces[i] == InterfaceType)
{
return true;
}
}
}

return false;
}
}
}
11 changes: 11 additions & 0 deletions AR-ROS/Assets/MRTK/Core/Attributes/ImplementsAttribute.cs.meta

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

Loading

0 comments on commit 1cb7487

Please sign in to comment.