CameraConvertSceneEffect.cs 484 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class CameraConvertSceneEffect : MonoBehaviour
  6. {
  7. public float twist = 0;
  8. private Material mat;
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. RawImage raw = this.GetComponent<RawImage>();
  13. mat = raw.material;
  14. }
  15. // Update is called once per frame
  16. void Update()
  17. {
  18. mat.SetFloat("_Twist", twist);
  19. }
  20. }