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

22 lines
481 B
C#
Raw Normal View History

using UnityEngine;
2020-03-04 20:47:24 +00:00
using UnityEngine.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);
}
}
}