0
、私は次のエラーを取得していますBurrow.cs:16) UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32)をC#ユニティユニティでとNullReferenceExceptionエラー
私はこのスクリプトを実行しよう:
using UnityEngine;
using System.Collections;
public class Burrow : MonoBehaviour {
void Start() {
}
void Update() {
}
void OnMouseDown() {
if (!GameObject.Find("Projectile").GetComponent<ProjectileDragging>().launch) {
GameObject.Find("Projectile").GetComponent<ProjectileDragging>().burrow = true;
}
}
}
このスクリプトは、国家環境保護総局からスクリプトから変数を参照しようとしていますUnityでのレートオブジェクト。