初心者です。
Unity3Dでゲーム制作をしていました。
下のコードを書いたところ
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class notegene : MonoBehaviour { [SerializeField] Note notePreFab; private void Start() { SpawnNote(); } public void SpawnNote() { Instantiate(notePreFab, new Vector3(2.5, 0.001 - 50.5), Quanternion.identify); } }
下のエラーコードが出てきてしまいました。
errorcode
error CS0246: The type or namespace name 'Note' could not be found (are you missing a using directive or an assembly reference?)
SerializeFieldの部分がうまくいかないです。
どう直したらよろしいのでしょうか?
Noteはどこで定義しているのですか?
まだ回答がついていません
会員登録して回答してみよう