浏览代码

adding changes

/validation-tool
Wesley Mareovich Smith 3 年前
当前提交
6187738c
共有 2 个文件被更改,包括 12 次插入2 次删除
  1. 1
      com.unity.perception/Runtime/Validation/CharacterTooling.cs
  2. 13
      com.unity.perception/Runtime/Validation/CharacterToolingLibrary.cs

1
com.unity.perception/Runtime/Validation/CharacterTooling.cs


using System.Collections.Generic;
using static UnityEngine.Perception.Content.CharacterValidation;
using System.Linq;
using UnityEngine.Perception.GroundTruth;
namespace UnityEngine.Perception.Content
{

13
com.unity.perception/Runtime/Validation/CharacterToolingLibrary.cs


Debug.Log("Found Nose: " + nosePos);
}
if(nosePos == Vector3.zero)
else if(nosePos == Vector3.zero)
{
if (distHeadZ < 0.001 && distHeadX < 0.001)
{

{
var jointLabel = gameObject.AddComponent<JointLabel>();
var data = new JointLabel.TemplateData();
var asset = new Object();
var template = AssetDatabase.GetAllAssetPaths().Where(o => o.EndsWith("CocoKeypointTemplate.asset", StringComparison.OrdinalIgnoreCase)).ToList();
foreach (string o in template)
{
if (o.Contains("com.unity.perception"))
{
asset = AssetDatabase.LoadAssetAtPath<Object>(o);
}
}
data.template = (KeypointTemplate)asset;
jointLabel.templateInformation = new List<JointLabel.TemplateData>();
jointLabel.templateInformation.Add(data);
}
}
正在加载...
取消
保存