static void Register() { #if UNITY_IOS && !UNITY_EDITOR const string k_SubsystemId = "ARKit-HumanBody"; bool supportsBodyPoseEstimation = NativeApi.UnityARKit_HumanBodyProvider_DoesSupportBodyPoseEstimation(); bool supportsBodySegmentationStencil = NativeApi.UnityARKit_HumanBodyProvider_DoesSupportBodySegmentationStencil(); bool supportsBodySegmentationDepth = NativeApi.UnityARKit_HumanBodyProvider_DoesSupportBodySegmentationDepth(); XRHumanBodySubsystemCinfo humanBodySubsystemCinfo = new XRHumanBodySubsystemCinfo() { id = k_SubsystemId, implementationType = typeof(ARKitHumanBodySubsystem), supportsHumanBody2D = supportsBodyPoseEstimation, supportsHumanBody3D = supportsBodyPoseEstimation, supportsHumanStencilImage = supportsBodySegmentationStencil, supportsHumanDepthImage = supportsBodySegmentationDepth, }; if (!XRHumanBodySubsystem.Register(humanBodySubsystemCinfo)) { Debug.LogErrorFormat("Cannot register the {0} subsystem", k_SubsystemId); } #endif }