Created
July 25, 2017 04:55
-
-
Save cabbibo/f0574eb6d6b5d8ccb86d093061f186c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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