- Home /
NullReferenceException MaskableGraphic.UpdateCull() upon Loading Player Data.
Hi all, I am facing an error that spams the generic NullReferenceException error, though there apears to be no reasoning or consistancy between each time you load the game, sometimes a few UI 'Delivery' Prefabs have this error, sometimes only 1. I am using ES3 (Easy Save 3) as my saving plugin I've been told it's nothing to do with their end, though I can't find any logical reason why it happens, every single delivery prefab is Identical the only variable between them is the Title and what Item is Collected upon clicking 'Collect'. This error only appears after the inital loading (if the prefabs never see a save/load they will be fine, but if they are saved and then loaded it presents the error upon loading, and then spams the error while scrolling up and down the deliveries. i've got a screenshot of a problematic UI that has loaded incorrectly, though even still if all the prefabs 'look' fine every single one presents the Maskable UpdateCull error while scrolling, each click of the scroll wheel presents 1 error from every single active prefab in the deliveries page.
This error doest really have an effect on the game nor weather the objects are collectable or not, though I am attempting to add a In-Game Debug Console so players can self diagnose a problem if one should arise and I do not want to get spammed with bug reports in regards to this log spammer error.
Error Code:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UI.MaskableGraphic.UpdateCull (System.Boolean cull) (at C:/Program Files/Unity/Hub/Editor/2020.3.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MaskableGraphic.cs:147)
UnityEngine.UI.MaskableGraphic.Cull (UnityEngine.Rect clipRect, System.Boolean validRect) (at C:/Program Files/Unity/Hub/Editor/2020.3.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MaskableGraphic.cs:138)
UnityEngine.UI.RectMask2D.PerformClipping () (at C:/Program Files/Unity/Hub/Editor/2020.3.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/RectMask2D.cs:261)
UnityEngine.UI.ClipperRegistry.Cull () (at C:/Program Files/Unity/Hub/Editor/2020.3.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Culling/ClipperRegistry.cs:47)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/Program Files/Unity/Hub/Editor/2020.3.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:202)
UnityEngine.Canvas.SendWillRenderCanvases () (at <a8e296dc7c7b4e92800d9e996ed99e15>:0)
is something not setup correctly on the Prefab itself, or is the canvas not setup correctly? is the scroll view not setup correctly? ir could it even be a problem with the Saving and Loading plugin, as this problem only presents itself after the prefabs have been loaded? I have no Idea I've been stuck on the error ever since I introduced Saving and Loading into my game months ago.