1234567891011121314151617181920212223242526272829303132333435363738 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class CustomMe : SCRtcMe
- {
- public GameObject myQuad;
- public override void setMyCamera(RenderTexture myRenderTexture)
- {
- base.setMyCamera(myRenderTexture);
- RawImage ri = myQuad.GetComponent<RawImage>();
- if (ri != null)
- {
- ri.material = (Material)Resources.Load("renderMat");
- }
- else
- {
- myQuad.GetComponent<MeshRenderer>().material = (Material)Resources.Load("renderMat");
- }
- if (ri != null)
- {
- ri.texture = myRenderTexture;
- }
- else
- {
- myQuad.GetComponent<MeshRenderer>().material.mainTexture = myRenderTexture;
- }
- }
- public void init()
- {
- // this.Quad.GetComponent<MeshRenderer>().material.mainTexture = SCRtcFactory.Instance.mSCRtcMe.tex;
- }
- }
|