Advertisement
kadyr

Untitled

Oct 16th, 2021
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.Rendering;
  5.  
  6. public class VolumeController : MonoBehaviour
  7. {
  8. public static VolumeController instance;
  9.  
  10.  
  11. private Volume cc;
  12.  
  13. private void Awake()
  14. {
  15. if (instance == null)
  16. instance = this;
  17. }
  18.  
  19. void Start()
  20. {
  21. cc = GetComponent<Volume>();
  22. }
  23.  
  24. public void DisableVolume()
  25. {
  26. cc.weight = 0;
  27. }
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement