soundvision/UnityProject/Assets/Scripts/Kinect/KinectPointCloud.cs

24 lines
492 B
C#
Raw Normal View History

using UnityEngine;
2019-11-07 22:52:03 +00:00
using UnityEngine.Experimental.VFX;
namespace cylvester
{
public class KinectPointCloud : MonoBehaviour
{
2019-11-07 22:52:03 +00:00
[SerializeField] private VisualEffect visualEffect;
2019-11-07 22:52:03 +00:00
public void OnDepthImageReceived(Texture texture)
{
2019-11-07 22:52:03 +00:00
visualEffect.SetTexture("DepthImage", texture);
}
2019-11-07 22:52:03 +00:00
public void OnMovementImageReceived(Texture texture)
{
2019-11-07 22:52:03 +00:00
visualEffect.SetTexture("MovementImage", texture);
}
}
}