soundvision/UnityProject/Assets/Scripts/Visualizer/IRPanelBehaviour.cs

27 lines
703 B
C#
Raw Normal View History

2019-07-07 15:56:52 +00:00
using UnityEngine;
using VideoInput;
namespace Visualizer
{
class IRPanelBehaviour : MonoBehaviour
{
#pragma warning disable 649
[SerializeField] private KinectManagerBehaviour kinectManagerBehaviour;
[SerializeField] private GameObject panel;
#pragma warning restore 649
private Renderer renderer_;
2019-10-04 19:52:26 +00:00
private Texture2D texture2D_;
2019-07-07 15:56:52 +00:00
void Start()
{
renderer_ = panel.GetComponent<Renderer>();
2019-10-04 19:52:26 +00:00
texture2D_ = new Texture2D(512, 512);
}
void Update()
{
renderer_.material.SetTexture("_BaseColorMap", kinectManagerBehaviour.KinectSensor.InfraredCamera.Data);
2019-07-07 15:56:52 +00:00
}
}
}