Class EasyARSettings.UnityXROptions
- 命名空間
- easyar
- 組件
- EasyAR.Sense.dll
與Unity XR Framework相關的配置項。
[Serializable]
public class EasyARSettings.UnityXROptions
- 繼承
-
EasyARSettings.UnityXROptions
欄位
ARFoundationSupport
EasyAR AR Foundation支持。建議常開否則使用ARFoundation時EasyAR可能無法正常工作。僅建議在未來AR Foundation更新產生不兼容且EasyAR暫未推出更新時關閉。
[Tooltip("EasyAR AR Foundation Support. It is recommended to keep this enabled; otherwise, EasyAR may not work properly with AR Foundation. Disable only if a future AR Foundation update causes incompatibility and EasyAR has not yet provided an update.")]
public bool ARFoundationSupport
UnityXRAutoSwitch
自動切換Unity XR(比如AR Foundation)物體。這個選項主要爲移動AR設計,頭顯上默認配置下功能會被禁用。
如果你需要自己控制這些組件的切換,或是EasyAR的行爲干擾了某些組件的正常工作,請確保關閉這些選項。
如果你需要在運行時自動切換AR Foundation,你需要通過Unity的右鍵菜單在場景中創建AR Foundation的 `ARSession` 及 `XR Origin` ,並使用AR Foundation的相機。
運行時,ARSession會在awake時禁用所有Unity XR Core組件及AR Foundation的組件。
運行時,如果被選擇的frame source繼承自ARFoundationFrameSource或是實現了XROrigin原點的ExternalDeviceFrameSource,則被禁用的Unity XR Core組件及AR Foundation組件將在StartSession()時啓用(未被EasyAR禁用的不會啓用)。如果其他frame source被選擇,則在StartSession()時會禁用所有Unity XR Core組件及AR Foundation的組件。
運行時,所有Unity XR Core組件及AR Foundation的組件會在StopSession(bool)時禁用。
需要注意,XR Interaction Toolkit的組件不受該選項控制,但其在EasyAR中是否可用未經驗證。理論上對於只使用XROrigin GameObject和其Camera的功能應該可以正常使用,但你可能需要設置CenterMode爲SessionOrigin。如果功能不正常,你需要自己管理XR Interaction Toolkit的組件,在frame source不是繼承自ARFoundationFrameSource時禁用相關組件。
[Tooltip("Auto switch Unity XR (like AR Foundation) objects. This option is primarily designed for mobile AR. On head-mounted devices, the feature will be disabled by default. If you need to manually control the switching of these components, or if EasyAR's behavior interferes with the normal operation of certain components, make sure to disable these options. Please read API documents for more details.")]
public EasyARSettings.UnityXROptions.AutoSwitchOptions UnityXRAutoSwitch