Commit 29de0c28 authored by BlackAngle233's avatar BlackAngle233
Browse files

10.19 learned

parent 912976bb
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb41c8335e2ca96449f3991db5fa5702, type: 3}
m_Name: IconSet
m_EditorClassIdentifier:
quadIcons: []
spriteIcons: []
charIconFont: {fileID: 0}
charIcons:
- Name: AppBarAdjust
Character: 60370
- Name: AppBarClose
Character: 59153
- Name: AppBarDone
Character: 59643
- Name: AppBarHide
Character: 59244
- Name: AppBarShow
Character: 59154
- Name: AppBarHome
Character: 60175
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
[assembly: System.Reflection.AssemblyVersion("2.5.0.0")]
[assembly: System.Reflection.AssemblyFileVersion("2.5.0.0")]
[assembly: System.Reflection.AssemblyProduct("Microsoft® Mixed Reality Toolkit aipmragent_work")]
[assembly: System.Reflection.AssemblyCopyright("Copyright © Microsoft Corporation")]
// 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; }
}
}
\ No newline at end of file
// 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() { }
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
using System;
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;
}
}
}
// 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;
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
using System;
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;
}
}
}
\ No newline at end of file
// 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;
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Utilities;
using System;
using System.Linq;
#if WINDOWS_UWP && !ENABLE_IL2CPP
using System.Reflection;
using Microsoft.MixedReality.Toolkit;
#endif // WINDOWS_UWP && !ENABLE_IL2CPP
namespace Microsoft.MixedReality.Toolkit.Input
{
/// <summary>
/// Attach to a controller device class to make it show up in the controller mapping profile.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class MixedRealityControllerAttribute : Attribute
{
/// <summary>
/// The SupportedControllerType to which the controller device belongs to.
/// </summary>
public SupportedControllerType SupportedControllerType { get; }
/// <summary>
/// List of handedness values supported by the respective controller.
/// </summary>
public Handedness[] SupportedHandedness { get; }
/// <summary>
/// Path to image file used when displaying an icon in the UI.
/// </summary>
public string TexturePath { get; }
/// <summary>
/// Additional flags for configuring controller capabilities.
/// </summary>
public MixedRealityControllerConfigurationFlags Flags { get; }
/// <summary>
///
/// </summary>
public MixedRealityControllerAttribute(
SupportedControllerType supportedControllerType,
Handedness[] supportedHandedness,
string texturePath = "",
MixedRealityControllerConfigurationFlags flags = 0)
{
SupportedControllerType = supportedControllerType;
SupportedHandedness = supportedHandedness;
TexturePath = texturePath;
Flags = flags;
}
/// <summary>
/// Convenience function for retrieving the attribute given a certain class type.
/// </summary>
public static MixedRealityControllerAttribute Find(Type type)
{
return type.GetCustomAttributes(typeof(MixedRealityControllerAttribute), true).FirstOrDefault() as MixedRealityControllerAttribute;
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Utilities;
using System;
namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Attribute that defines the properties of a Mixed Reality Toolkit data provider.
/// </summary>
[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)]
public class MixedRealityDataProviderAttribute : MixedRealityExtensionServiceAttribute
{
/// <summary>
/// The interface type of the IMixedRealityService for which the data provider is supported.
/// </summary>
public Type ServiceInterfaceType { get; }
public MixedRealityDataProviderAttribute(
Type serviceInterfaceType,
SupportedPlatforms runtimePlatforms,
string name = "",
string profilePath = "",
string packageFolder = "MixedRealityToolkit",
bool requiresProfile = false) : base(runtimePlatforms, name, profilePath, packageFolder, requiresProfile)
{
ServiceInterfaceType = serviceInterfaceType;
}
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Utilities;
using System;
using System.Linq;
using UnityEngine;
#if UNITY_EDITOR
using Microsoft.MixedReality.Toolkit.Utilities.Editor;
using UnityEditor;
#endif
#if WINDOWS_UWP && !ENABLE_IL2CPP
using Microsoft.MixedReality.Toolkit;
#endif // WINDOWS_UWP && !ENABLE_IL2CPP
namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Attribute that defines the properties of a Mixed Reality Toolkit extension service.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class MixedRealityExtensionServiceAttribute : Attribute
{
/// <summary>
/// The friendly name for this service.
/// </summary>
public virtual string Name { get; }
/// <summary>
/// The runtime platform(s) to run this service.
/// </summary>
public virtual SupportedPlatforms RuntimePlatforms { get; }
/// <summary>
/// Is a profile explicitly required?
/// </summary>
public virtual bool RequiresProfile { get; }
/// <summary>
/// The file path to the default profile asset relative to the package folder.
/// </summary>
public virtual string DefaultProfilePath { get; }
/// <summary>
/// The package where the default profile asset resides.
/// </summary>
public virtual string PackageFolder { get; }
/// <summary>
/// The default profile.
/// </summary>
public virtual BaseMixedRealityProfile DefaultProfile
{
get
{
#if UNITY_EDITOR
MixedRealityToolkitModuleType moduleType = MixedRealityToolkitFiles.GetModuleFromPackageFolder(PackageFolder);
if (moduleType != MixedRealityToolkitModuleType.None)
{
string folder = MixedRealityToolkitFiles.MapModulePath(moduleType);
if (!string.IsNullOrWhiteSpace(folder))
{
return AssetDatabase.LoadAssetAtPath<BaseMixedRealityProfile>(System.IO.Path.Combine(folder, DefaultProfilePath));
}
}
else
{
string folder;
if (EditorProjectUtilities.FindRelativeDirectory(PackageFolder, out folder))
{
return AssetDatabase.LoadAssetAtPath<BaseMixedRealityProfile>(System.IO.Path.Combine(folder, DefaultProfilePath));
}
}
// If we get here, there was an issue finding the profile.
Debug.LogError("Unable to find or load the profile.");
#endif
return null;
}
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="runtimePlatforms">The platforms on which the extension service is supported.</param>
/// <param name="defaultProfilePath">The relative path to the default profile asset.</param>
/// <param name="packageFolder">The package folder to which the path is relative.</param>
public MixedRealityExtensionServiceAttribute(
SupportedPlatforms runtimePlatforms,
string name = "",
string defaultProfilePath = "",
string packageFolder = "MixedRealityToolkit",
bool requiresProfile = false)
{
RuntimePlatforms = runtimePlatforms;
Name = name;
DefaultProfilePath = defaultProfilePath;
PackageFolder = packageFolder;
RequiresProfile = requiresProfile;
}
#if UNITY_EDITOR
/// <summary>
/// Convenience function for retrieving the attribute given a certain class type.
/// </summary>
/// <remarks>
/// This function is only available in a UnityEditor context.
/// </remarks>
public static MixedRealityExtensionServiceAttribute Find(Type type)
{
return type.GetCustomAttributes(typeof(MixedRealityExtensionServiceAttribute), true).FirstOrDefault() as MixedRealityExtensionServiceAttribute;
}
#endif // UNITY_EDITOR
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Attach to a class implementing IMixedRealityServiceInspector to generate a facade inspector.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class MixedRealityServiceInspectorAttribute : Attribute
{
public MixedRealityServiceInspectorAttribute(Type serviceType)
{
if (!typeof(IMixedRealityService).IsAssignableFrom(serviceType))
throw new Exception("Can't use this attribute with type " + serviceType + " - service must implement " + typeof(IMixedRealityService) + " interface.");
ServiceType = serviceType;
}
public Type ServiceType { get; private set; }
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Attribute that defines which service a profile is meant to be consumed by.
/// Only applies to profiles that are consumed by types implementing IMixedRealityService.
/// A service must implement all required types and no excluded types to be considered compatible with the profile.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public class MixedRealityServiceProfileAttribute : Attribute
{
public MixedRealityServiceProfileAttribute(Type requiredType, Type excludedType = null)
{
RequiredTypes = new Type[] { requiredType };
ExcludedTypes = excludedType != null ? new Type[] { excludedType } : new Type[0];
}
public MixedRealityServiceProfileAttribute(Type[] requiredTypes, Type[] excludedTypes = null)
{
RequiredTypes = requiredTypes;
ExcludedTypes = excludedTypes != null ? excludedTypes : new Type[0];
}
public Type[] RequiredTypes { get; private set; }
public Type[] ExcludedTypes { get; private set; }
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Physics
{
/// <summary>
/// Attribute used to make an <see cref="int"/> field render a dropdown generated from the current layers defined in the Tag Manager.
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public sealed class PhysicsLayerAttribute : PropertyAttribute
{
public PhysicsLayerAttribute() { }
}
}
\ No newline at end of file
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit
{
/// <summary>
/// Attribute used to ensure that a GameObject inspector slot only accepts prefabs.
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public sealed class PrefabAttribute : PropertyAttribute { }
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment