mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0
  • 指南
  • API 文档
  • 指南
  • Contributing
  • Experimental Features

    Show / Hide Table of Contents
    • MRTK入门
      • 发布说明
      • MRTK包内容
      • 从早期版本更新
      • 从HTK更新
      • 生成和部署MRTK
      • NuGet包
      • MRTK配置对话框
      • 开始使用 MRTK和XR SDK
      • 性能
      • 全息图稳定
      • 在大型项目中使用MRTK
    • 架构
      • 概述
      • 框架和运行时
      • 输入系统
        • 术语
        • 核心系统
        • Controllers, pointers, and focus
      • 系统,扩展服务和 data providers
    • 功能概述
      • 边界系统 Boundary System
        • 边界系统概述
        • 配置边界可视化
      • 相机系统 Camera System
        • 相机系统概述
        • Camera Settings Providers
          • Windows 混合现实相机设置
          • Unity AR相机设置[实验性]
          • 创建camera settings provider
      • 跨平台支持
        • 为iOS和Android配置MRTK
      • 检测平台能力
      • 诊断系统 Diagnostics System
        • 诊断系统概述
        • 配置诊断系统
        • 使用可视化分析器
      • 扩展服务 Extension Services
        • 扩展服务创建向导
        • 场景过渡服务概述
      • 输入系统 Input System
        • 输入概览
        • 输入动作 Input Actions
        • 输入事件 Input Events
        • Input Providers
          • Input Providers 概述
          • 创建一个 input data provider
        • 控制器 Controllers
        • 眼动跟踪 Eyes
          • 概述
          • 入门
          • 通过代码访问数据
          • 验证跟踪校准 Validate Tracking Calibration
        • 凝视 Gaze
        • 手势 Gestures
        • 手部 Hands
        • 如何添加近距离交互 Near Interaction
        • 编辑器内输入模拟 In-Editor Input Simulation
        • 指针 Pointers
        • 语音输入 Voice Input
          • 语音转录 Dictation
          • 语音(命令和控制) Speech
      • 多场景系统 Multi Scene System
        • 多场景系统概述
        • 场景类型 Scene Types
        • 内容场景加载 Content Scene Loading
        • 监测内容加载 Monitoring Content Loading
        • 光照场景操作 Lighting Scene Operations
      • 打包 Packaging
        • MRTK包 MRTK Packages
        • MRTK模块化 MRTK Modularization
      • 配置文件 Profiles
        • 配置文件概述
        • 配置指南 Configuration Guide
      • 渲染 Rendering
        • 材质实例概述 Material Instance Overview
        • Shaders
          • MRTK标准着色器 MRTK Standard Shader
      • 服务 Services
        • 什么是混合现实特性
        • 什么是 MixedRealityServiceRegistry 和IMixedRealityServiceRegistrar
        • 扩展服务 Extension services
      • 空间感知系统 Spatial Awareness System
        • 空间感知概述
        • Spatial Observers
          • 为设备配置 Observers
          • 为Editor配置 Observers
          • 通过代码控制 Observers
          • 创建自定义 Observer
      • 传送系统概述 Teleport System Overview
      • 工具
        • Dependency Window
        • Extension Service Creation Wizard
        • Holographic Remoting
        • Input Animation Recording
          • Input Animation File Format Specification
        • Optimize Window
        • Runtime tools
          • Controller Mapping tool
      • UX 构建模块
        • 工具箱窗口 Toolbox Window
        • 按钮 Button
        • 边界框 Bounding Box
        • 对象操纵器 Object Manipulator
        • Manipulation Handler [废弃]
        • Slate
        • 系统键盘 System Keyboard
        • 可交互的 Interactable
        • Solvers
          • 点击放置 Tap to Place
        • 对象集合 Object Collection
        • 提示工具条 Tooltips
        • 滑动条 Slider
        • 手部菜单 Hand Menu
        • 近处菜单 Near Menu
        • 应用程序栏 App Bar
        • 指尖可视化 Fingertip Visualization
        • 进度指示器 Progress Indicator
        • 对话框 Dialog [实验性]
        • 手势教学 Hand Coach [实验性]
        • 可滚动对象集合 Scrolling Object Collection [实验性]
        • 脉冲着色器 Pulse Shader [实验性]
        • 停靠控件 Dock Control [实验性]
        • HoloLens键盘助手 [实验性]
      • 示例场景
        • 示例中心
        • 手势交互示例场景
        • 眼动跟踪示例场景
    • Contributing
      • Contributing Overview
      • Coding Guidelines
      • Writing and Running Tests
      • Writing Documentation
      • Pull Requests
      • Experimental Features
      • Breaking Changes
      • How to use DocFX
    • Planning
      • Roadmap
    • Notice
    • Authors

    Experimental features

    Some features the MRTK team works on appear to have a lot of initial value even if we haven’t fully fleshed out the details. For these types of features, we want the community to get a chance to see 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.

    What to expect from an experimental feature

    If a component is marked experimental you can expect the following:

    • An example scene demonstrating usage, located under MRTK/Examples/Experimental sub-folder
    • Experimental features may not have docs.
    • They probably don't have tests.
    • Experimental features are subject to change.

    Experimental feature guidelines

    Experimental code should live in a separate folder

    Experimental code should go into a top-level experimental folder followed by the experimental feature name. For example, if trying to contribute a new feature FooBar, put code in the following:

    • Example scenes, scripts go into MRTK/Examples/Experimental/FooBar/
    • Component scripts, prefabs go into MRTK/SDK/Experimental/FooBar/
    • Component inspectors go into MRTK/SDK/Inspectors/Experimental/FooBar

    When using sub-folders under the experimental feature name, try to mirror the same folder structure of MRTK.

    For example, solvers would go under MRTK/SDK/Experimental/FooBar/Features/Utilities/Solvers/FooBarSolver.cs

    Keep scenes in a scene folder near the top: MRTK/Examples/Experimental/FooBar/Scenes/FooBarExample.unity

    Note

    We considered not having a single Experimental root folder and instead putting Experimental under say MRTK/Examples/HandTracking/Scenes/Experimental/HandBasedMenuExample.unity. We decided to go with folders at the base to make the experimental features easier to discover.

    Experimental code should be in a special namespace

    Ensure that the experimental code lives in an experimental namespace that matches the non-experimental location. For example, if your component is part of solvers at Microsoft.MixedReality.Toolkit.Utilities.Solvers, its namespace should be Microsoft.MixedReality.Toolkit.Experimental.Utilities.Solvers.

    See this PR for an example.

    Experimental features should have an [Experimental] attribute

    Add an [Experimental] attribute above one of your fields to have a small dialog appear in the component editor that mentions your feature is experimental and subject to significant changes.

    Menus for experimental features should go under "Experimental" sub-menu

    Ensure that experimental features are under "experimental" sub-menus when adding commands to menus in the editor. Here are a few examples:

    Adding a top-level menu command:

    [MenuItem("Mixed Reality Toolkit/Experimental/MyCommand")]
    public static void MyCommand()
    

    Adding a component menu:

    [AddComponentMenu("MRTK/Experimental/MyCommand")]
    

    Documentation

    Follow these steps to add documentation for your experimental feature:

    1. Any documentation for an experimental feature should go in a README.md file in the experimental folder. For example, MRTK/SDK/Experimental/ScrollingObjectCollection/README.md.

    2. Under Feature Overviews Add a link in the Experimental section at Documentation/toc.yml.

    Minimize impact to MRTK code

    While your MRTK change might get your experiment to work, it could impact other people in ways you do not expect. Any regressions you make to the MRTK core code would result in your pull request getting reverted.

    Aim to have zero changes in folders other than experimental folders. Here is a list of folders that can have experimental changes:

    • MRTK/SDK/Experimental
    • MRTK/SDK/Inspectors/Experimental
    • MRTK/Examples/Experimental

    Changes outside of these folders should be treated very carefully. If your experimental feature must include changes to MRTK core code, consider splitting out MRTK changes into a separate pull request that includes tests and documentation.

    Using your experimental feature should not impact people's ability to use core controls

    Most people use core UX components like the button, ManipulationHandler and Interactable very frequently. They will likely not use your experimental feature if it prevents them from using buttons.

    Using your component should not break buttons, ManipulationHandler, BoundingBox, or interactable.

    For example, in this ScrollableObjectCollection PR, adding a ScrollableObjectCollection caused people to not be able to use the HoloLens button prefabs. Even though this was not caused by a bug in the PR (but rather exposed an existing bug), it prevented the PR from getting checked in.

    Provide an example scene that demonstrates how to use the feature

    People need to see how to use your feature, and how to test it.

    Provide an example under MRTK/Examples/Experimental/YOUR_FEATURE

    Minimize user visible flaws in experimental features

    Others will not use the experimental feature if it does not work, it will not graduate to a feature.

    Test your example scene on your target platform, make sure it works as expected. Make sure your feature also works in editor, so people can rapidly iterate and see your feature even if they don’t have the target platform.

    Graduating experimental code into MRTK code

    If a feature ends up seeing quite a lot of use, then we should graduate it into core MRTK code. To do this, the feature should have tests, documentation, and an example scene.

    When you are ready to graduate the feature MRTK, create an issue to check in your PR against. The PR should include all the things needed to make this a core feature: tests, documentation, and an example scene showing usage.

    Also, don’t forget to update the namespaces to remove the “Experimental” subspace.

    • Improve this Doc
    In This Article
    • What to expect from an experimental feature
    • Experimental feature guidelines
      • Experimental code should live in a separate folder
      • Experimental code should be in a special namespace
      • Experimental features should have an [Experimental] attribute
      • Menus for experimental features should go under "Experimental" sub-menu
    • Documentation
      • Minimize impact to MRTK code
      • Using your experimental feature should not impact people's ability to use core controls
      • Provide an example scene that demonstrates how to use the feature
      • Minimize user visible flaws in experimental features
    • Graduating experimental code into MRTK code
    Back to top Generated by DocFX