- Home /
Are all of the Errors important in a project
Are all of the Errors important in a project?? And are MissingReferenceException Errors important?
Answer by swanne · Jul 05, 2018 at 07:09 PM
In short, yes. There are 3 types of feedback. Errors, warnings and notifications. Errors are always important. Warnings are sometimes important. Notifications, not so much.
The missing reference error message means that there is a gameObject or script or component etc that you have explicitly designed to use but the game cannot find it.
What is the exact error message you are receiving? Copy and paste it from your console.
$$anonymous$$issingReferenceException: The object of type 'vItemSlot' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. UnityEngine.Component.GetComponent[RectTransform] () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ComponentBindings.gen.cs:48) Invector.vItem$$anonymous$$anager.vItemWindow.CreateEquipmentWindow (System.Collections.Generic.List`1 items, Invector.vItem$$anonymous$$anager.OnSubmitSlot onPickUpItemCallBack, Invector.vItem$$anonymous$$anager.OnSelectSlot onSelectSlotCallBack, Boolean destroyAdictionSlots) (at Assets/Invector-3rdPersonController/Item$$anonymous$$anager/Scripts/vItemWindow.cs:75) Invector.vItem$$anonymous$$anager.vItemWindowDisplay.OnEnable () (at Assets/Invector-3rdPersonController/Item$$anonymous$$anager/Scripts/vItemWindowDisplay.cs:25) UnityEngine.GameObject:SetActive(Boolean) Invector.vItem$$anonymous$$anager.vEquipArea:OnSubmitSlot(vItemSlot) (at Assets/Invector-3rdPersonController/Item$$anonymous$$anager/Scripts/vEquipArea.cs:81) Invector.vItem$$anonymous$$anager.vItemSlot:OnPointerClick(PointerEventData) (at Assets/Invector-3rdPersonController/Item$$anonymous$$anager/Scripts/vItemSlot.cs:150) Invector.vItem$$anonymous$$anager.vEquipSlot:OnPointerClick(PointerEventData) (at Assets/Invector-3rdPersonController/Item$$anonymous$$anager/Scripts/vEquipSlot.cs:44) UnityEngine.EventSystems.EventSystem:Update()
Ok, so a script or object is trying to access the vItemSlot gameObject and it's reporting that the gameObject has been destroyed.
What is that object in your game and does it get destroyed?
I want when I click on the specific object in the item menu, that object destroy and I write a script for it and I success to destroy that but when I click and open item menu this error appear. is that a important error?
Yes, that's an important error. Either the menu is looking for the vItemSlot object that has just been destroyed or a script that has been created to do something with it once destroyed is unable to find it. Step through the logic of what happens from game start to error creation. Does it only happen the once when you click on the object? Does it repeatedly report that error. If repeatedly then the source of the error is within an update function or loop. If only once, click again ans see if you get another same message.
Your answer
Follow this Question
Related Questions
I really ned help at startup 0 Answers
I can't import project tiny in Unity 2019 2 Answers
MacOS "Creating Project Folder Failed!" 1 Answer
Unity shows only Unity Package Error 0 Answers