Unity と 宴 最新です
win10
Unity歴 3年です
お世話になっております
UIでobjectのONOFFを使用すると以下の文が出るようになりました。お手数ですがお暇な時でもご教授頂けると幸いです
エラー文
NullReferenceException: Object reference not set to an instance of an object
Utage.AdvParamManager.GetParameter[T] (System.String key) (at Assets/Utage/Scripts/ADV/DataManager/SettingData/Param/AdvParamManager.cs:192)
Utage.AdvParamManager.GetParameterInt (System.String key) (at Assets/Utage/Scripts/ADV/DataManager/SettingData/Param/AdvParamManager.cs:152)
objectOC.Update () (at Assets/gadanti/Scripts/objectOC.cs:22)
スクリプト
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Utage;
public class objectOC : MonoBehaviour
{
public AdvEngine engine;
[Header("開きたいゲームオブジェクト")]
public GameObject Object;
// Start is called before the first frame update
void Start()
{
Object.SetActive(false);
}
// Update is called once per frame
void Update()
{ // 宴変数呼び出し
int param = (int)engine.Param.GetParameterInt("Fkamera");
//objectのONOFF
if (param > 0)
{
Object.SetActive(false);
}
else
{
Object.SetActive(true);
}
}
}