CustomMe.cs 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class CustomMe : SCRtcMe
  6. {
  7. public float volumn = 0.2f;
  8. public GameObject myQuad;
  9. public override void setMyCamera(Texture myRenderTexture)
  10. {
  11. base.setMyCamera(myRenderTexture);
  12. /*
  13. RawImage ri = myQuad.GetComponent<RawImage>();
  14. if (ri != null)
  15. {
  16. ri.material = (Material)Resources.Load("renderMat");
  17. }
  18. else
  19. {
  20. myQuad.GetComponent<MeshRenderer>().material = (Material)Resources.Load("renderMat");
  21. }
  22. if (ri != null)
  23. {
  24. ri.texture = myRenderTexture;
  25. }
  26. else
  27. {
  28. myQuad.GetComponent<MeshRenderer>().material.mainTexture = myRenderTexture;
  29. }*/
  30. }
  31. public void init()
  32. {
  33. // this.Quad.GetComponent<MeshRenderer>().material.mainTexture = SCRtcFactory.Instance.mSCRtcMe.tex;
  34. }
  35. }