bsimser / Inventory-Pro

https://devdog.io
MIT License
2 stars 0 forks source link

2018.3 - Creating items #281

Open bsimser opened 5 years ago

bsimser commented 5 years ago

Original report by Anonymous.


After update to 2018.3 Inventory Pro - newest - 2.5.13 ?-assetstore shows that We cannot create Item on MainEditor When we hit button "create item" we get error: (i tried create UnusableInventoryItem but it's happens on evert type)

The object of type "UnusableInventoryItem" has been destroyed but you are still trying to access it.

How to recreatable: Just use 2018.3 and try create item.

ss: https://i.imgur.com/OSxbeZY.png

Full 1st eror: SerializedObject target has been destroyed. UnityEditor.SerializedObject:Update() Devdog.InventoryPro.Editors.InventoryEditorBase:OnCustomInspectorGUI(CustomOverrideProperty[]) (at Assets/Devdog/InventoryPro/Scripts/Other/Editor/InventoryEditorBase.cs:33) Devdog.InventoryPro.Editors.InventoryItemBaseEditor:OnCustomInspectorGUI(CustomOverrideProperty[]) (at Assets/Devdog/InventoryPro/Scripts/Items/Editor/InventoryItemBaseEditor.cs:132) Devdog.InventoryPro.Editors.InventoryEditorBase:OnInspectorGUI() (at Assets/Devdog/InventoryPro/Scripts/Other/Editor/InventoryEditorBase.cs:28) Devdog.InventoryPro.Editors.ItemEditor:DrawDetail(InventoryItemBase, Int32) (at Assets/Devdog/InventoryPro/Scripts/Managers/Editor/InventoryEditors/Items/ItemEditor.cs:281) Devdog.General.Editors.EditorCrudBase`1:Draw() (at Assets/Devdog/General/UI/Editor/CrudEditors/EditorCrudBase.cs:87) Devdog.InventoryPro.Editors.EmptyEditor:Draw() (at Assets/Devdog/InventoryPro/Scripts/Managers/Editor/InventoryEditors/EmptyEditor.cs:112) Devdog.InventoryPro.Editors.InventoryMainEditor:OnGUI() (at Assets/Devdog/InventoryPro/Scripts/Managers/Editor/InventoryMainEditor.cs:264) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

2nd full error: MissingReferenceException: The object of type 'UnusableInventoryItem' 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. Devdog.InventoryPro.Editors.InventoryItemBaseEditor.OnCustomInspectorGUI (Devdog.InventoryPro.Editors.CustomOverrideProperty[] extraOverride) (at Assets/Devdog/InventoryPro/Scripts/Items/Editor/InventoryItemBaseEditor.cs:143) Devdog.InventoryPro.Editors.InventoryEditorBase.OnInspectorGUI () (at Assets/Devdog/InventoryPro/Scripts/Other/Editor/InventoryEditorBase.cs:28) Devdog.InventoryPro.Editors.ItemEditor.DrawDetail (Devdog.InventoryPro.InventoryItemBase item, System.Int32 index) (at Assets/Devdog/InventoryPro/Scripts/Managers/Editor/InventoryEditors/Items/ItemEditor.cs:281) Devdog.General.Editors.EditorCrudBase`1[T].Draw () (at Assets/Devdog/General/UI/Editor/CrudEditors/EditorCrudBase.cs:87) Devdog.InventoryPro.Editors.EmptyEditor.Draw () (at Assets/Devdog/InventoryPro/Scripts/Managers/Editor/InventoryEditors/EmptyEditor.cs:112) Devdog.InventoryPro.Editors.InventoryMainEditor.OnGUI () (at Assets/Devdog/InventoryPro/Scripts/Managers/Editor/InventoryMainEditor.cs:264) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310) UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:363) UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:322) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

bsimser commented 5 years ago

Original comment by Joris Huijbregts (Bitbucket: jjahuijbregts, ).


Resolved issues of creation and warnings, however, 2018.3 (new prefab system) doesn't allow editing prefabs directly with our current setup; So a fix has to be found for this (prefab can still be selected and edited that way, but this is rather inconvenient)

bsimser commented 5 years ago

Original comment by Stickboy Creative (Bitbucket: stickboycreative, GitHub: stickboycreative).


@jjahuijbregts what is the fix for this? I'm encountering as well, but don't see this documented.

bsimser commented 5 years ago

Original comment by Jens Rauch (Bitbucket: waterstorm, GitHub: waterstorm).


I've just ran into the same problem. Currently the Inventory Pro Item Editor seems to be unusable with this bug. Is there already an ETA or at least any workaround? Hope you can fix this soon :)

bsimser commented 5 years ago

Original comment by Joris Huijbregts (Bitbucket: jjahuijbregts, ).


Herman has created a patch that we'll push out soon. Due to a Unity bug it's only works with Unity 2018.3.6 and later.

If you'd like the patch before it goes live in the asset store you can PM herman on our Discord channel: https://discord.gg/zjNj5zZ

bsimser commented 4 years ago

Original comment by Felipe Artur (Bitbucket: [Felipe Artur](https://bitbucket.org/Felipe Artur), ).


I am currently blocked by this same problem. The bad thing is that i just noticed the problem a long time after a lot of work was made.

Do you have any idea when the patch is going live? Or can you point me into the right direction to fix it in the code?