using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Power : MonoBehaviour
{
ย ย public GameObject Shield;
ย ย public Transform target;
ย ย void Start()
ย ย {
ย ย ย ย
ย ย }
ย ย // Update is called once per frame
ย ย void Update()
ย ย {
ย ย ย ย Shield.transform.position = target.transform.position;
ย ย }
}
ํ๊ฒ์ด ์์ง์ด๋ฉด ๊ฐ์ด ์ค๋๋ ๊ฐ์ด ์์ง์ด๋ฉฐ ํ๊ฒ์ ๋ณดํธย ํ๋ ค๊ณ ํฉ๋๋ค.
๊ฐ์ด ์์ ์์ง์ด๋๋ฐย ๋๋ํ๊ฐ ๋ ์ใ
UnassignedReferenceException: The variable Shield of Power has not been assigned.
You probably need to assign the Shield variable of the Power script in the inspector.
Power.Update () (at Assets/Scripts/Power.cs:18)
๋๋ํ ๋ด์ฉ์ธ๋ฐ ๋ญ๊ฐ ์๋ชป ๋๊ฑฐ ๊ฐ์ต๋๋ค. ์ด๋ป๊ฒ ํด์ผ ๋๋์?
ํด๋น ๋๊ธ์ ์ญ์ ๋์์ต๋๋ค.
๊ฐ์ฌํฉ๋๋ค. ๋ค๋ฅธ๊ณณ์ ๋ฃ์๋๊ฒ ์๋ฌ๋๊ฑฐ์๋ค์