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的元件。
執行階段,若選取的影格來源繼承自ARFoundationFrameSource或實作了XROrigin原點的ExternalDeviceFrameSource,則被停用的Unity XR Core元件及AR Foundation元件將在StartSession()時啟用(未被EasyAR停用的不會啟用)。若選取其他影格來源,則在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元件,在影格來源非繼承自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