2017-10-19から1日間の記事一覧
やりたいこと シーンをまたいで変数値を保持するクラスを作りたい。 シングルトンクラスを作る using UnityEngine; using System.Collections; public class Global : MonoBehaviour { static public Global instance; void Awake(){ if (instance == null) …
You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all MonoBehavior…