Class ARSessionFactory
- 命名空间
- easyar
- 程序集
- EasyAR.Sense.dll
ARSession工厂。
public class ARSessionFactory
- 继承
-
ARSessionFactory
方法
AddFrameFilter<Filter>(GameObject, Resources)
添加frame filter到ARSession。添加稠密空间地图时需传入对应资源。
public static GameObject AddFrameFilter<Filter>(GameObject sessionObj, ARSessionFactory.Resources resources = null) where Filter : FrameFilter
参数
sessionObjresources
类型参数
Filter
AddFrameSource<Source>(GameObject, bool)
添加frame source到ARSession。
public static GameObject AddFrameSource<Source>(GameObject sessionObj, bool addToFirst = false) where Source : FrameSource
参数
sessionObjaddToFirst
类型参数
Source
AddOriginChild(GameObject)
添加XROriginChildController到ARSession原点。
public static GameObject AddOriginChild(GameObject origin)
参数
origin
CreateController<Controller>(Resources)
创建控制器。创建稀疏空间地图时需传入对应资源。
public static GameObject CreateController<Controller>(ARSessionFactory.Resources resources = null)
参数
resources
类型参数
Controller
CreateOrigin()
创建ARSession原点(未使用Unity XR框架比如AR Foundation时)。
public static GameObject CreateOrigin()
CreateSession()
创建空的ARSession。
public static GameObject CreateSession()
CreateSession(ARSessionPreset, Resources)
创建ARSession。在包含稠密空间地图时需传入对应资源。
public static GameObject CreateSession(ARSessionFactory.ARSessionPreset preset, ARSessionFactory.Resources resources = null)
参数
presetresources
CreateVideoRecorder()
创建video recorder。
public static GameObject CreateVideoRecorder()
DefaultName(Type)
组件的默认名称。
public static string DefaultName(Type type)
参数
type
DefaultName<Component>()
组件的默认名称。
public static string DefaultName<Component>()
类型参数
Component
IsSession(GameObject)
是否是ARSession。
public static bool IsSession(GameObject sessionObj)
参数
sessionObj
SetupFrameFilters(List<GameObject>, ARSessionPreset)
配置frame filter以符合预设需求。
public static void SetupFrameFilters(List<GameObject> filters, ARSessionFactory.ARSessionPreset preset)
参数
filterspreset
SetupImageTracker(GameObject, ARSessionPreset)
配置image tracker以符合预设需求。
public static void SetupImageTracker(GameObject filter, ARSessionFactory.ARSessionPreset preset)
参数
filterpreset
SetupMegaTracker(GameObject, ARSessionPreset)
配置Mega tracker以符合预设需求。
public static void SetupMegaTracker(GameObject filter, ARSessionFactory.ARSessionPreset preset)
参数
filterpreset
SetupObjectTracker(GameObject, ARSessionPreset)
配置object tracker以符合预设需求。
public static void SetupObjectTracker(GameObject filter, ARSessionFactory.ARSessionPreset preset)
参数
filterpreset
SortFrameSource(GameObject, FrameSourceSortMethod)
对ARSession物体下的frame source进行排序。
public static void SortFrameSource(GameObject sessionObj, ARSessionFactory.FrameSourceSortMethod method)
参数
sessionObjmethod