ActiveController Class

Description

管理 GameObject .activeSelf的 MonoBehaviour

默认策略如下: TargetController 默认使用 ActiveController.Strategy.ActiveWhileTrackedXROriginChildController 默认使用 ActiveController.Strategy.ActiveAfterFirstTracked

可以使用 ActiveController.OverrideStrategy 来覆盖默认策略。设置 MonoBehaviour .enabled为false可关闭控制。


Enums

public enum ActiveController.Strategy

GameObject .activeSelf的控制策略。


Properties

enabled

C#

public bool enabled { get; set; }

ARSession 运行时启用/停用active控制。禁用时,EasyAR将不再修改 GameObject .activeSelf。

OverrideStrategy

C#

public Optional< ActiveController.Strategy > OverrideStrategy { get; set; }

覆盖策略,可用于覆盖默认行为。

空值表达使用默认策略,策略模式与物体上其它组件相关。有值会覆盖默认策略。