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