AR Session

AR Session 控制一组运行时的AR功能。

../_images/image_as2_1.png

一个典型的AR Session包含一个ARSessin节点,多个运行时可选的Frame Source,以及一个或多个Frame Filter。

../_images/image_as2_2.png

创建 AR Session

在Hierachy窗口空白处点击右键,可以通过功能菜单创建预设的ARSession: EasyAR Sense > [Feature] > AR Session ([Sub Feature]] Preset)

../_images/image_as2_3.png

在这个菜单中你可以看到所有预设的ARSession列表: EasyAR Sense > AR Session (Preset) > AR Session ([Sub Feature]] Preset)

../_images/image_as2_4.png

添加/删除 Frame Filter

Hierachy窗口中选中ARSession,然后点击右键,可以通过功能菜单添加特定功能的Frame Filter: EasyAR Sense > [Feature] > Frame Filter: [Sub Feature]

../_images/image_as2_5.png

要删除Frame Filter,只需要删除ARSession下对应功能的节点即可。

添加/删除 Frame Source

Hierachy窗口中选中ARSession,然后点击右键,可以通过功能菜单添加适用于特定功能的Frame Source: EasyAR Sense > [Feature] > Frame Source: [Sub Feature]

../_images/image_as2_6.png

Frame Source通常与功能不是一对一关系,所以你也可以通过以下菜单进行创建 EasyAR Sense > Frame Source by Transform Type > [x Dof] > Frame Source: [Sub Feature]

../_images/image_as2_7.png ../_images/image_as2_8.png

要删除Frame Source,只需要删除ARSession下对应功能的节点即可。

Frame Source在运行时会按照ARSession上配置的选项进行选择,自动情况下会根据transform顺序选择第一个可用的。

可以通过菜单来快速调整默认排序 EasyAR Sense > Utility > Sort Frame Source: [Method]

../_images/image_as2_9.png

通常建议应用所有以下排序(与EasyAR默认创建的ARSession相同):

  • Sort Frame Source : ARCore > ARCore ARFoundation

  • Sort Frame Source : ARKit > ARKit ARFoundation

  • Sort Frame Source : System SLAM > Motion Tracker

也可以在Hierachy窗口中直接移动Frame Source的相对位置来达到同样的效果。