浏览代码

Merge branch 'latest-preview' of github.cds.internal.unity3d.com:unity/arfoundation-samples into latest-preview

/4.1
Mike Durand 4 年前
当前提交
ed1156cf
共有 3 个文件被更改,包括 9 次插入13 次删除
  1. 4
      Assets/Scenes/ARCollaborationData/Colorizer.cs
  2. 10
      Assets/Scenes/ImageTracking/DynamicLibrary.cs
  3. 8
      Packages/manifest.json

4
Assets/Scenes/ARCollaborationData/Colorizer.cs


[SerializeField]
Renderer m_Renderer;
#if UNITY_EDITOR
#else
public Renderer renderer
#endif
{
get => m_Renderer;
set => m_Renderer = value;

10
Assets/Scenes/ImageTracking/DynamicLibrary.cs


set => m_Width = value;
}
public JobHandle jobHandle { get; set; }
public AddReferenceImageJobState jobState { get; set; }
}
[SerializeField, Tooltip("The set of images to add to the image library at runtime")]

m_StringBuilder.AppendLine("Add image status:");
foreach (var image in m_Images)
{
m_StringBuilder.AppendLine($"\t{image.name}: {(image.jobHandle.IsCompleted ? "done" : "pending")}");
m_StringBuilder.AppendLine($"\t{image.name}: {(image.jobState.status.ToString())}");
}
GUILayout.Label(m_StringBuilder.ToString());
break;

// Note: You do not need to do anything with the returned JobHandle, but it can be
// useful if you want to know when the image has been added to the library since it may
// take several frames.
image.jobHandle = mutableLibrary.ScheduleAddImageJob(image.texture, image.name, image.width);
image.jobState = mutableLibrary.ScheduleAddImageWithValidationJob(image.texture, image.name, image.width);
}
m_State = State.AddingImages;

var done = true;
foreach (var image in m_Images)
{
if (!image.jobHandle.IsCompleted)
if (!image.jobState.jobHandle.IsCompleted)
{
done = false;
break;

}
}
}
}
}

8
Packages/manifest.json


{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.analytics": "3.3.5",
"com.unity.collab-proxy": "1.3.9",
"com.unity.ext.nunit": "1.0.0",
"com.unity.purchasing": "2.1.1",
"com.unity.test-framework": "1.1.18",
"com.unity.textmeshpro": "3.0.1",
"com.unity.ugui": "1.0.0",
"com.unity.xr.arcore": "4.1.0-preview.11",
"com.unity.xr.arfoundation": "4.1.0-preview.11",

正在加载...
取消
保存