1
NGUI 3 Support / wrap content scroll view Transform error
« on: November 12, 2015, 03:08:21 AM »
I have a store set up that is just items in a scroll view. I want to delete the item if the player owns that item already. The issue is I get this error when you attempt to scroll through the items after them being deleted
MissingReferenceException: The object of type 'Transform' 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.Transform.get_localPosition () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineTransformBindings.gen.cs:34)
UIWrapContent.WrapContent () (at Assets/NGUI/Scripts/Interaction/UIWrapContent.cs:180)
EventDelegate.Execute () (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:476)
EventDelegate.Execute (System.Collections.Generic.List`1 list) (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:644)
UIButton.OnClick () (at Assets/NGUI/Scripts/Interaction/UIButton.cs:248)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UICamera:Notify(GameObject, String, Object) (at Assets/NGUI/Scripts/UI/UICamera.cs:1469)
UICamera:ProcessRelease(Boolean, Single) (at Assets/NGUI/Scripts/UI/UICamera.cs:2325)
UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:2375)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1830)
UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1943)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:1631)
I have attempted to run the WrapContent() after deleting the item and the scroll views ResetPosition() with same results
any help would be appreciated
MissingReferenceException: The object of type 'Transform' 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.Transform.get_localPosition () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineTransformBindings.gen.cs:34)
UIWrapContent.WrapContent () (at Assets/NGUI/Scripts/Interaction/UIWrapContent.cs:180)
EventDelegate.Execute () (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:476)
EventDelegate.Execute (System.Collections.Generic.List`1 list) (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:644)
UIButton.OnClick () (at Assets/NGUI/Scripts/Interaction/UIButton.cs:248)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UICamera:Notify(GameObject, String, Object) (at Assets/NGUI/Scripts/UI/UICamera.cs:1469)
UICamera:ProcessRelease(Boolean, Single) (at Assets/NGUI/Scripts/UI/UICamera.cs:2325)
UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:2375)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1830)
UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1943)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:1631)
I have attempted to run the WrapContent() after deleting the item and the scroll views ResetPosition() with same results
any help would be appreciated