- changed status to open
ArgumentException when trying to do a global revert
When I try to do a global revert of a prefab on my project I get the following error:
ArgumentException: The Object you want to instantiate is null. UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:196) UnityEngine.Object.Instantiate (UnityEngine.Object original) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:163) AntiheroStudios.uPrefabs.Editor.uPrefabRevertUtilities.RevertAllObjectInstances (AntiheroStudios.uPrefabs.uObject asset) (at Assets/AntiheroStudios/uPrefabs/Editor/uPrefabRevertUtilities.cs:392) AntiheroStudios.uPrefabs.Editor.uPrefabGameObjectCustomInspector+<OnDrawPrefab>c__AnonStorey0.<>m__11 () (at Assets/AntiheroStudios/uPrefabs/Editor/uPrefabGameObjectInspector.cs:348) AntiheroStudios.uPrefabs.Editor.uPrefabRevertPopupWindow.OnGUI (Rect rect) (at Assets/AntiheroStudios/uPrefabs/Editor/uPrefabRevertPopupWindow.cs:52) UnityEditor.PopupWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/PopupWindow.cs:83) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:187) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:180) UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:76)
I remember having a similar issue in the past, which was related in the end to some corrupt prefabs (there is no issue for that, I think we discussed by email).
This time the error seems to be a bit different, even if the effect is the same. Any clue how to fix this?
Comments (11)
-
-
Damian,
Can you send me a unity package to devon@anithero-studios.com with a replication project? I can't replicate this issue on my end.
Thanks
-
reporter I don't really know how to replicate this, it is something that happens on every prefab on my project by know. Is it possible to do a session of desktop sharing maybe so you can take a look?
-
reporter Throwing in some interesting information. This happens when doing a global revert of a full object, but when I do a global revert of a single component everything seems to be fine.
-
What version of uPrefabs were you using before you upgraded? I'm try to track down whether this is due to an internal refactor or not. Also, could you send me a few screenshots of the uPrefabs component on the objects you are trying to revert. Also, a screenshot of the object, as a child, you are trying to revert. I think there may be something corrupt about the "child" itself.
-
reporter Hello Devon. I think I was using version 1.4 something before, but this issue was there before I upgraded. I just didn't really need this functionality until now. I don't think it is an issue with any specific prefab, since it happens with every prefab in my proyect, no matter which one, and even the ones I create in the moment.
-
Damian,
Can you delete the uPrefabs folder from your project and then re-import the library from the asset store? Since the last version you used was so old, there may be an issue that will require you to re-hook up the children prefabs. Can you provide the screenshots I requested in the previous comment?
Thanks,
-
reporter Hello Devon. I removed uPrefabs completely, imported it again, reimported all my assets, but the issue is still there.
Here are the requested screenshots:
As I told you, it happens with each and every prefab, but here you can see an example.
-
Would you be willing to email me or give me access to your project so I can make a quicker determination? devon@antihero-studios.com. I don't have any video time available in the next week or so.
Even if you zip up the project and email it, or share a link to the repository.
I will keep your information confidential.
-
Updated and sent you a new version. Please test and let me know.
-
- changed status to resolved
- Log in to comment