Issue Regarding Custom UI
I'm trying to implement a simple bar as a Custom U.I. I've put it into my U.I resources, but everytime I start the game I get a NullReferenceException and the game wont load after that. Not Sure why this is happening. Any help would be appreciated. Here is a the complete error:
NullReferenceException: Object reference not set to an instance of an object
Naninovel.UI.CustomUI.OnEnable () (at Assets/Naninovel/Runtime/UI/CustomUI.cs:130)
UnityEngine.Object:Instantiate(GameObject)
Naninovel.Engine:Instantiate(GameObject, String, Nullable1, Transform) (at Assets/Naninovel/Runtime/Engine/Engine.cs:293)
1:Run() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/MoveNextRunner.cs:20)
Naninovel.UIManager:InstantiatePrefab(GameObject, String) (at Assets/Naninovel/Runtime/UI/UIManager.cs:191)
Naninovel.<InstantiateUIsAsync>d__38:MoveNext() (at Assets/Naninovel/Runtime/UI/UIManager.cs:246)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:Start(<InstantiateUIsAsync>d__38&) (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs:133)
Naninovel.UIManager:InstantiateUIsAsync()
Naninovel.<InitializeAsync>d__37:MoveNext() (at Assets/Naninovel/Runtime/Engine/Engine.cs:137)
UniRx.Async.CompilerServices.MoveNextRunner
UniRx.Async.UniTaskCompletionSource:TryInvokeContinuation() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:171)
UniRx.Async.UniTaskCompletionSource:TrySetResult() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:189)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:SetResult() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs:81)
Naninovel.<PerformPostEngineInitializationTasks>d__92:MoveNext() (at Assets/Naninovel/Runtime/State/StateManager.cs:358)
UniRx.Async.CompilerServices.MoveNextRunner1:Run() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/MoveNextRunner.cs:20)
1:Run() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/MoveNextRunner.cs:20)
UniRx.Async.UniTaskCompletionSource:TryInvokeContinuation() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:171)
UniRx.Async.UniTaskCompletionSource:TrySetResult() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:189)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:SetResult() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs:81)
Naninovel.<<PerformPostEngineInitializationTasks>g__LoadGlobalAsync|92_1>d:MoveNext() (at Assets/Naninovel/Runtime/State/StateManager.cs:348)
UniRx.Async.CompilerServices.MoveNextRunner
UniRx.Async.UniTaskCompletionSource1:TryInvokeContinuation() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:342)
1:TrySetResult(GlobalStateMap) (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:361)
UniRx.Async.UniTaskCompletionSource
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder1:SetResult(GlobalStateMap) (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs:229)
1:Run() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/MoveNextRunner.cs:20)
Naninovel.<LoadOrDefaultAsync>d__13:MoveNext() (at Assets/Naninovel/Runtime/Common/SaveSlotManager/IOSaveSlotManager.cs:104)
UniRx.Async.CompilerServices.MoveNextRunner
UniRx.Async.UniTaskCompletionSource1:TryInvokeContinuation() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:342)
1:TrySetResult(GlobalStateMap) (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:361)
UniRx.Async.UniTaskCompletionSource
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder1:SetResult(GlobalStateMap) (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs:229)
1:Run() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/MoveNextRunner.cs:20)
Naninovel.<LoadAsync>d__12:MoveNext() (at Assets/Naninovel/Runtime/Common/SaveSlotManager/IOSaveSlotManager.cs:96)
UniRx.Async.CompilerServices.MoveNextRunner
UniRx.Async.UniTaskCompletionSource1:TryInvokeContinuation() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:342)
1:TrySetResult(GlobalStateMap) (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:361)
UniRx.Async.UniTaskCompletionSource
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder1:SetResult(GlobalStateMap) (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs:229)
1:Run() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/MoveNextRunner.cs:20)
Naninovel.<DeserializeDataAsync>d__20:MoveNext() (at Assets/Naninovel/Runtime/Common/SaveSlotManager/IOSaveSlotManager.cs:158)
UniRx.Async.CompilerServices.MoveNextRunner
UniRx.Async.UniTaskCompletionSource1:TryInvokeContinuation() (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:342)
1:TrySetResult(String) (at Assets/Naninovel/Runtime/Common/Async/UniTask/UniTaskCompletionSource.cs:361)
UniRx.Async.UniTaskCompletionSource
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder1:SetResult(String) (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs:229)
1:Run() (at Assets/Naninovel/Runtime/Common/Async/UniTask/CompilerServices/MoveNextRunner.cs:20)
Naninovel.<UnzipStringAsync>d__28:MoveNext() (at Assets/Naninovel/Runtime/Common/Utilities/StringUtils.cs:395)
UniRx.Async.CompilerServices.MoveNextRunner
UnityEngine.UnitySynchronizationContext:ExecuteTasks()