유니티 공부중인데
-
using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class 라이트 : MonoBehaviour
{private Light theLight; private float targetlntensity; private float currentlntensity; private void Start() { theLight = GetComponet<Light>(); currentlntensity = theLight.intensity; targetlntensity = Random.Range(0.4f, 1f); } // Update is called once per frame void Update() { if(Mathf.Abs(targetlntensity - currentlntensity) >= 0.01) { if(targetlntensity - currentlntensity >= 0) currentlntensity += Time.deltaTime * 3f; else currentlntensity -= Time.deltaTime * 3f; theLight.intensity = currentlntensity; theLight.range = currentlntensity + 10; } else { targetlntensity = Random.Range(0.4f, 1f); }
}뭔가 계속 틀려서 오류가난다는데 먼지모르겠어요
https://www.youtube.com/watch?v=CJm1vsbh_78&list=PLUZ5gNInsv_PR72-V9bTABaZu2py4DJq8&index=7 분명 이거 보고 따라했는데
SUGGESTED TOPICS
-
컨테이너 실행이 안됩니다
구름IDE 관련 • • 김베타 -
각종 import 안됨
구름IDE 관련 • • 한현진