Unity Documentation?

Unity Documentation?

Hey all,

I was hoping for some further information/readme's regarding Unity integration.  Loading the project currently returns an Internal compiler error, so I'm unable to test this properly.  The SDK example files are working fine.

What version of Unity is this designed for?  We're currently using 3.5.6 so if it's 4 what steps are necessary to downgrade it so we don't have to front the $1500 upgrade.

Thanks in advance!

Justin Kovac

3 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

To anyone else trying to get this working you cannot define PXCUPipeline as a new PXCUPipeline since it's a static class and cannot have an instance created of it. Here's working code:


using UnityEngine;

public class DrawCube: MonoBehaviour {
	private Texture2D texture;

	private PXCUPipeline.Mode mode = PXCUPipeline.Mode.GESTURE;
	void Start () {
		PXCUPipeline.Init(mode);

		int width, height;

		PXCUPipeline.QueryLabelMapSize(out width, out height);

		texture = new Texture2D(width,height,TextureFormat.ARGB32,false);

		renderer.material.mainTexture = texture;
	}
	void OnDisable() {
		PXCUPipeline.Close();
	}
	void Update () {
		if (!PXCUPipeline.AcquireFrame(false)) return;

		if (PXCUPipeline.QueryLabelMapAsImage(texture)) texture.Apply();

		PXCUPipeline.ReleaseFrame();
	}

}

I'd love to see some additional documentation or examples (hand detection with the solar demo or positional demos similar to the ballista demo), so please keep us posted on future updates on this!

发表评论

登录添加评论。还不是成员?立即加入