static void UpdateAssets(bool arkitEnabled)
            {
                ARKitReferenceObjectEntry.SetObjectBytesEnabled(arkitEnabled);

                if (arkitEnabled)
                {
                    ValidateReferenceObjects(Warnings.All);
                }
            }
コード例 #2
0
        public ARReferenceObject(XRReferenceObject referenceObject, ARKitReferenceObjectEntry entry)
        {
            m_Path = AssetDatabase.GetAssetPath(entry);
            if (string.IsNullOrEmpty(m_Path))
            {
                throw new InvalidAssetPathException();
            }

            var info = ARObjectImporter.ReadInfo(m_Path);

            if (!info.HasValue)
            {
                throw new MissingMetadataException();
            }
            else if (string.IsNullOrEmpty(info.Value.trackingDataReference))
            {
                throw new MissingTrackingDataException();
            }

            name = referenceObject.name + "_" + referenceObject.guid.ToUUIDString();
        }