mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0
  • 指南
  • API 文档
  • 指南
  • 功能概述
  • UX 构建模块
  • 对象集合 Object Collection

    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

    对象集合 Object collection

    Object collection

    Object collection是一个脚本,用于帮助以预定义的三维形状布局对象数组。它支持各种表面样式,包括平面、圆柱、球体和径向。因为它支持Unity中的任何对象,它可以用于布局2D和3D对象。

    Object collection 脚本

    • GridObjectCollection 支持柱面、平面、球体、放射状表面类型
    • ScatterObjectCollection 支持分散样式集合
    • TileGridObjectCollection 提供了一些GridObjectCollection的附加选项 注意: TileGridObjectCollection无法扩展 GridObjectCollection, 并有几个错误(见[ issue 6237). 因此,建议使用 GridObjectCollection.
    Grid Object Collection - Cylinder Grid Object Collection - Cylinder Grid Object Collection - Sphere Grid Object Collection - Sphere
    Grid Object Collection - Radial Grid Object Collection - Radial Grid Object Collection - Plane Grid Object Collection - Plane
    Scattered Object Collection Scattered Object Collection Tile Grid Object Collection Tile Grid Object Collection

    如何使用 object collection

    创建一个空的GameObject,并分配一个 Object Collection脚本给它。任何对象都可以添加为GameObject的子对象。添加完子对象后,单击inspector面板中的Update Collection按钮来生成对象集合。对象将根据集合参数在场景中进行布局。也可以通过代码访问更新集合。

    Object collection

    GridObjectCollection 内容对齐

    GridObjectCollection中的内容可以对齐,以便父对象锚定在集合的顶部/中间/底部和左侧/中间/右侧。使用anchor 属性指定内容对齐方式。

    GridObjectCollection 布局顺序

    使用Layout字段指定子元素排列的行/列顺序:

    Column Then Row — 子元素首先被水平(按列)布局,然后是垂直(按行)布局。使用Num Columns(或代码中的Columns属性)指定网格中的列数。

    Column then row layout

    Row Then Column — 子元素首先垂直(按行)布局,然后水平(按列)布局。使用Num Rows(或代码中的Rows属性)指定网格中的行数。

    Row then column layout

    Horizontal - 子元素只使用列布局在单行中

    Vertical -子元素只使用行布局在单个列中。

    Object collection 示例

    ObjectCollectionExamples.unity示例场景包含各种对象集合类型的示例。

    元素周期表是一个演示对象集合如何工作的示例应用程序。它使用对象集合来将3D元素框布局成不同的形状。

    Object collection 类型

    3D 对象

    对象集合可用于布局导入的3D对象。下面的示例展示了使用集合的3D椅子模型对象的平面和圆柱形布局。

    Object collection

    2D 对象

    对象集合也可以从2D图像装箱。例如,可以将多个图像以网格样式放置。

    Object collection

    • Improve this Doc
    In This Article
    • Object collection 脚本
    • 如何使用 object collection
    • GridObjectCollection 内容对齐
    • GridObjectCollection 布局顺序
    • Object collection 示例
    • Object collection 类型
    Back to top Generated by DocFX