UnityでSkyBoxの回転をしようと思ってやってみたがうまくできません。
なにかコード間違ってるとこありますでしょうか?
C#
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4 5public class RotateSkyBox : MonoBehaviour { 6 [SerializeField,Header("1フレームに回す角度")] 7 public float _angleFrame = 0.1f; 8 float _rot = 0.0f; 9 10 // Update is called once per frame 11 void Update () { 12 _rot += _angleFrame; 13 if (_rot >= 360.0f) 14 { 15 _rot -= 360.0f; 16 } 17 RenderSettings.skybox.SetFloat("_Rotation", _rot); 18 19 } 20} 21 22
あなたの回答
tips
プレビュー