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 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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!

Leave a Comment

Please sign in to add a comment. Not a member? Join today