直接上代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 修改天空盒子
/// </summary>
public class ApacheAmendSky : MonoBehaviour {
/// <summary>
/// 新的天空盒子
/// </summary>
public Material msmNewSky;
private void OnEnable()
{
MsMendSky();
}
private void MsMendSky()
{
RenderSettings.skybox = msmNewSky;
}
}
网友评论