ShaderPrinter.cs 357 B

1234567891011121314151617181920
  1. using System;
  2. using UnityEngine;
  3. public class ShaderPrinter : MonoBehaviour
  4. {
  5. private void Start()
  6. {
  7. this.mat = base.GetComponent<Renderer>().material;
  8. }
  9. private void Update()
  10. {
  11. if (UnityEngine.Input.GetKeyDown(KeyCode.P))
  12. {
  13. UnityEngine.Debug.Log("range: " + this.mat.GetFloat("range"));
  14. }
  15. }
  16. private Material mat;
  17. }