Table of Contents

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

參數

sessionObj
resources

類型參數

Filter

AddFrameSource<Source>(GameObject, bool)

添加frame source到ARSession。

public static GameObject AddFrameSource<Source>(GameObject sessionObj, bool addToFirst = false) where Source : FrameSource

參數

sessionObj
addToFirst

類型參數

Source

AddOriginChild(GameObject)

添加XROriginChildController到ARSession原點。

public static GameObject AddOriginChild(GameObject origin)

參數

origin

CreateController<Controller>(Resources)

創建控制器。創建稀疏空間地圖時需傳入對應資源。

public static GameObject CreateController<Controller>(ARSessionFactory.Resources resources = null) where Controller : TargetController

參數

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)

參數

preset
resources

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)

參數

filters
preset

SetupImageTracker(GameObject, ARSessionPreset)

配置image tracker以符合預設需求。

public static void SetupImageTracker(GameObject filter, ARSessionFactory.ARSessionPreset preset)

參數

filter
preset

SetupMegaTracker(GameObject, ARSessionPreset)

配置Mega tracker以符合預設需求。

public static void SetupMegaTracker(GameObject filter, ARSessionFactory.ARSessionPreset preset)

參數

filter
preset

SetupObjectTracker(GameObject, ARSessionPreset)

配置object tracker以符合預設需求。

public static void SetupObjectTracker(GameObject filter, ARSessionFactory.ARSessionPreset preset)

參數

filter
preset

SortFrameSource(GameObject, FrameSourceSortMethod)

對ARSession物體下的frame source進行排序。

public static void SortFrameSource(GameObject sessionObj, ARSessionFactory.FrameSourceSortMethod method)

參數

sessionObj
method