Skip to content

Instantly share code, notes, and snippets.

@cabbibo
Created July 25, 2017 04:55
Show Gist options
  • Save cabbibo/f0574eb6d6b5d8ccb86d093061f186c9 to your computer and use it in GitHub Desktop.
Save cabbibo/f0574eb6d6b5d8ccb86d093061f186c9 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.iOS;
public class StealCamTextures : MonoBehaviour {
public UnityARVideo video;
private Material mat;
// Use this for initialization
void Start () {
mat = GetComponent<MeshRenderer>().material;
}
// Update is called once per frame
void Update () {
mat.SetTexture( "_vidTexY" , video._videoTextureY );
mat.SetTexture( "_vidTexCBCR" , video._videoTextureCbCr );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment