浏览代码

Display full dimensions (not just width) in centimeters

/1.5-preview
Tim Mowrer 6 年前
当前提交
35e828cb
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 7
      Assets/Scenes/ImageTracking/TrackedImageInfoManager.cs

7
Assets/Scenes/ImageTracking/TrackedImageInfoManager.cs


// Update information about the tracked image
var text = canvas.GetComponentInChildren<Text>();
text.text = string.Format(
"trackableId\n{0}\ntrackingState: {1}\nGUID: {2}\nReference width: {3}\nDetected size: {4:0.0000}x{5:0.0000}",
"trackableId\n{0}\ntrackingState: {1}\nGUID: {2}\nReference size: {3} cm\nDetected size: {4} cm",
trackedImage.referenceImage.width,
trackedImage.size.x,
trackedImage.size.y);
trackedImage.referenceImage.size * 100f,
trackedImage.size * 100f);
var planeParentGo = trackedImage.transform.GetChild(0).gameObject;
var planeGo = planeParentGo.transform.GetChild(0).gameObject;

正在加载...
取消
保存