浏览代码

Remove special handling of max num tracked images as it is now part of the subsystem

/1.5-preview
Tim Mowrer 6 年前
当前提交
b3267d9c
共有 5 个文件被更改,包括 2 次插入16 次删除
  1. 1
      Assets/Scenes/ImageTracking/ImageTracking.unity
  2. 2
      Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary.asset
  3. 15
      Assets/Scenes/ImageTracking/TrackedImageInfoManager.cs
  4. 0
      /Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary.asset.meta
  5. 0
      /Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary.asset

1
Assets/Scenes/ImageTracking/ImageTracking.unity


m_Name:
m_EditorClassIdentifier:
m_ReferenceLibrary: {fileID: 11400000, guid: c86e375d7e7430442a1104e88fa21f21, type: 2}
m_MaxNumberOfMovingImages: 4
m_TrackedImagePrefab: {fileID: 3312728602301253215, guid: 5d81b097707c58e4b949537763ba4bbe,
type: 3}
--- !u!114 &857573726

2
Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary.asset


m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 848409ee8ba454f42a5ddff137688a27, type: 3}
m_Name: ReferenceImageLibrary2
m_Name: ReferenceImageLibrary
m_EditorClassIdentifier:
m_Images:
- {fileID: 11400000, guid: a7351be44527d304a85355f98dc6e294, type: 2}

15
Assets/Scenes/ImageTracking/TrackedImageInfoManager.cs


using UnityEngine.XR.ARSubsystems;
using UnityEngine.XR.ARFoundation;
#if UNITY_IOS && !UNITY_EDITOR
using UnityEngine.XR.ARKit;
#endif
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Build;

foreach (var trackedImage in eventArgs.updated)
UpdateInfo(trackedImage);
}
void Update()
{
#if UNITY_IOS && !UNITY_EDITOR
var subsystem = m_TrackedImageManager.subsystem as ARKitImageTrackingSubsystem;
if (subsystem != null)
{
subsystem.maximumNumberOfTrackedImages = m_TrackedImageManager.referenceLibrary.count;
}
#endif
}
}

/Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary2.asset.meta → /Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary.asset.meta

/Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary2.asset → /Assets/Scenes/ImageTracking/Images/ReferenceImageLibrary.asset

正在加载...
取消
保存