「Unity/3d/太陽移動」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「<pre> using UnityEngine; public class SunScene : MonoBehaviour { [SerializeField] GameObject directionalLight; float x = 0; void Update() { x++;...」) |
|||
行1: | 行1: | ||
+ | "Directional Light"をdirectionalLightに | ||
<pre> | <pre> | ||
using UnityEngine; | using UnityEngine; |
2022年12月6日 (火) 12:03時点における版
"Directional Light"をdirectionalLightに
using UnityEngine; public class SunScene : MonoBehaviour { [SerializeField] GameObject directionalLight; float x = 0; void Update() { x++; directionalLight.transform.localRotation = Quaternion.Euler(x, -30f, 0f); } }