void InitSubSenders() { TrackedPoseSender.TryCreate(this); ARKitFaceSender.TryCreate(this); ARKitOcclusionSender.TryCreate(this); ARKitPlaneSender.TryCreate(this); ARKitHumanBodySender.TryCreate(this); }
public static TrackedPoseSender TryCreate(ARKitSender sender) { TrackedPoseSender self = null; var trackedPoseDriver = FindObjectOfType <TrackedPoseDriver>(); if (trackedPoseDriver != null) { self = sender.gameObject.AddComponent <TrackedPoseSender>(); self.trackedPoseDriver = trackedPoseDriver; } var arPoseDriver = FindObjectOfType <ARPoseDriver>(); if (arPoseDriver != null) { self = sender.gameObject.AddComponent <TrackedPoseSender>(); self.arPoseDriver = arPoseDriver; } return(self); }