Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using AC;
- public class ChangeSkybox : MonoBehaviour
- {
- MainCamera mainCamera;
- void Awake ()
- {
- mainCamera = GetComponent <MainCamera>();
- }
- void Update ()
- {
- if (mainCamera.attachedCamera)
- {
- GetComponent<Camera>().GetComponent <Skybox>().material = mainCamera.attachedCamera.GetComponent <Skybox>().material;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement