Shamba

skybox_control

Mar 14th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Skybox_control : MonoBehaviour {
  6.     public Material skyboxes;
  7.  
  8.     private void OnTriggerEnter(Collider other)
  9.     {
  10.         if(other.tag == "Player")
  11.         {
  12.             RenderSettings.skybox = skyboxes;
  13.         }
  14.     }
  15. }
Add Comment
Please, Sign In to add comment