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

22 lines
494 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-09 15:51:15 +00:00
public void OnDepthImageReceived(Texture2D texture)
{
2019-11-07 22:52:03 +00:00
visualEffect.SetTexture("DepthImage", texture);
}
2019-11-09 15:51:15 +00:00
public void OnMovementImageReceived(Texture2D texture)
{
2019-11-07 22:52:03 +00:00
visualEffect.SetTexture("MovementImage", texture);
}
}
}