最近接触了微软的Azure Kinect,就想在unity跑一下官网的实例程序sample_unity_bodytracking,折腾几天没搞定,于是决定购买unity Asset Store上的适用于 Unity3D 的 Azure Kinect(相机 API + 身体跟踪 API)资源包用用看,导入后发现两个错误
Assets\LightBuzz_Azure_Kinect\Scripts\Demo_Kinect4Azure_BodyTracking.cs(42,33): error CS0029: Cannot implicitly convert type ‘System.Collections.Generic.List<LightBuzz.Kinect4Azure.Body>’ to ‘System.Collections.Generic.List<Body>’
Assets\LightBuzz_Azure_Kinect\Scripts\Demo_Kinect4Azure_BodyTracking.cs(44,35): error CS1503: Argument 1: cannot convert from ‘System.Collections.Generic.List’ to ‘System.Collections.Generic.List<LightBuzz.Kinect4Azure.Body>’
双击错误打开vs2019查看 改成下图保存即可 代码如下
_stickmanManager.Load(frame.BodyFrameSource.Bodies);
然后就可以测试他的Demo_Kinect4Azure_BodyTracking了
测试过程如下 打开Assets/LightBuzz_Azure_Kinect/Scenes/Demo_Kinect4Azure_BodyTracking_3D.unity
|