예제 #1
0
 void InitSubSenders()
 {
     TrackedPoseSender.TryCreate(this);
     ARKitFaceSender.TryCreate(this);
     ARKitOcclusionSender.TryCreate(this);
     ARKitPlaneSender.TryCreate(this);
     ARKitHumanBodySender.TryCreate(this);
 }
예제 #2
0
        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);
        }