public static TrackedPoseSender TryCreate(ARKitSender sender)
        {
            var driver = FindObjectOfType <TrackedPoseDriver>();

            if (driver == null)
            {
                return(null);
            }
            var self = sender.gameObject.AddComponent <TrackedPoseSender>();

            self.driver = driver;
            return(self);
        }
Exemple #2
0
        public static ARKitPlaneSender TryCreate(ARKitSender sender)
        {
            ARPlaneManager planeManager = FindObjectOfType <ARPlaneManager>();

            if (planeManager == null)
            {
                return(null);
            }
            var self = sender.gameObject.AddComponent <ARKitPlaneSender>();

            self.planeManager = planeManager;
            return(self);
        }
        public static ARKitFaceSender TryCreate(ARKitSender sender)
        {
            ARFaceManager faceManager = FindObjectOfType <ARFaceManager>();

            if (faceManager == null)
            {
                return(null);
            }
            var self = sender.gameObject.AddComponent <ARKitFaceSender>();

            self.faceManager = faceManager;
            return(self);
        }
        public static ARKitHumanBodySender TryCreate(ARKitSender sender)
        {
            var manager = FindObjectOfType <ARHumanBodyManager>();

            if (manager == null)
            {
                return(null);
            }
            var self = sender.gameObject.AddComponent <ARKitHumanBodySender>();

            self.humanBodyManager = manager;
            return(self);
        }
Exemple #5
0
        public static ARKitOcclusionSender TryCreate(ARKitSender sender)
        {
            var manager = FindObjectOfType <AROcclusionManager>();

            if (manager == null)
            {
                return(null);
            }
            var self = sender.gameObject.AddComponent <ARKitOcclusionSender>();

            self.occlusionManager = manager;
            return(self);
        }
Exemple #6
0
        public static ARKitEnvironmentProbeSender TryCreate(ARKitSender sender)
        {
            var manager = FindObjectOfType <AREnvironmentProbeManager>();

            if (manager == null)
            {
                return(null);
            }
            var self = sender.gameObject.AddComponent <ARKitEnvironmentProbeSender>();

            self.environmentProbeManager = manager;
            return(self);
        }
Exemple #7
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);
        }