TypeLoadException Error When Game gameObject Selected on the Hierarcy

Theremy

New member
Hi,

So I got a spam of TypeLoadException error message everytime I select my Game game object on the hierarchy.
I'm not sure when it started, but I just notice it when I integrate Pixel Crushers' Dialogue System saver to the project.
So far, it doesn't break anything. I can build the game and play it without problem.

Full error message and the settings of Game game object on the inspector included below.
I'm using Unity 2020.2.1f1 and UIS v1.1.5
I'm not sure what else to provide, so please let me know if you need anything.

Code:
TypeLoadException: Could not resolve type with token 0100000b (from typeref, class/assembly Opsive.Shared.Editor.Utility.InspectorUtility, Opsive.Shared.Editor.Utility, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <e020ad89c1af43769f98694c4076cf19>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
 

Attachments

  • TypeLoadException.PNG
    TypeLoadException.PNG
    73 KB · Views: 5
It looks like your Object Pool inspector isn't drawn properly so the error might be from there. As for the reason it is happening I do not know...

Perhaps @Justin has an idea?
 
Yep, if I remove the component, the error is gone.
The error also appear if I add the Object Pool to other game object.

Is it save if I remove Object Pooler completely from my project? is the any other component reference to it? because I actually have my own object pool system for spawning pickup and other various objects.
 
The Object Pool is used internally by many systems. If it does not exist in the scene it will be added dynamically.
So even if you remove it from your scene everything should still work since it will be created as soon as a script tries to use it.

Could you send us the full error stack message first, we'll look into it to see if we can fix it
 
That error doesn't give much detail. Listing the steps to reproduce it within a fresh project would definitely be helpful.
 
Hi, I was busy with other things and now I just get back to this.
So I'm not sure how to reproduce it in a fresh project, since it's not happening. I also don't know when did it start, because I rarely access Game game object. I just notice it when I integrate the Pixel Crusher's Dialogue System because I need to put some of their components on Game game object.

But to narrow it down, it happens if I add Object Pool component to a game object and if the Object Pool is maximized
I hope this video can explain how it happens (FYI, this is an unlisted video)

As for the full stack error, do you mean this one?
Code:
TypeLoadException: Could not resolve type with token 0100000b (from typeref, class/assembly Opsive.Shared.Editor.Utility.InspectorUtility, Opsive.Shared.Editor.Utility, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
  at UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () [0x00290] in <e020ad89c1af43769f98694c4076cf19>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.UIElements.<>c__DisplayClass58_0:<CreateIMGUIInspectorFromEditor>b__0()
UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint()
UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh(DrawParams, Single, Exception&)
UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain(RenderChainCommand, Material, Material, Texture, Texture, Texture, Single, NativeSlice`1, NativeSlice`1, MaterialPropertyBlock, Boolean, Exception&)
UnityEngine.UIElements.UIR.RenderChain:Render()
UnityEngine.UIElements.UIRRepaintUpdater:Update()
UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase(VisualTreeUpdatePhase)
UnityEngine.UIElements.Panel:UpdateForRepaint()
UnityEngine.UIElements.Panel:Repaint(Event)
UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel)
UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent(Int32, IntPtr, Boolean&)
UnityEngine.UIElements.UIEventRegistration:ProcessEvent(Int32, IntPtr)
UnityEngine.UIElements.<>c:<.cctor>b__1_2(Int32, IntPtr)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
 
That error looks like it's on Unity's side of things. I would report the bug to them. If you look at the stack trace there isn't anything within the inventory system that is causing the exception so it looks like Unity needs to change something within their DIsplayClass constructor.
 
I also have the same error:

TypeLoadException: Could not resolve type with token 0100000b (from typeref, class/assembly Opsive.Shared.Editor.Utility.InspectorUtility, Opsive.Shared.Editor.Utility, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <ab574a2f598240d68c66d280c533b9d3>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

Also, when I delete Object Pool the errors goes away. I also have pixel crusher but no component on the Game game object.
 
Please report the bug to Unity so they can fix it. It's coming from UnityEditor.UIElements.InspectorElement.
 
I am running into this issue now after updating to the most recent version of the Ultimate Character Controller. I am on Unity 2020.2.5f1, but is there any workaround for this?

This error has caused my project to cease functioning entirely. The demo scene runs fine, but my own scenes start the player at a menu where they can select between several characters. After I updated the pack, things were fine and I got everything up and running again. I started the process of updating all my own assets to implement the updated UCC, but it all broke down when I used the Opsive menu to "Setup Scene" with the Game object and the ObjectPool component. Since then I have not been able to run the game correctly, even after restoring to a backup I made a few hours prior to these issues. The menu in my game scene is frozen entirely and the player cannot make any selections to spawn into the game when that scene loads.

My game starts at a main menu, transitions to a lobby system (I am using the PUN integration), then the player(s) load into the game scene. The main menu and lobby system are both still completely functional, but once the game scene loads -- with the ObjectPool component -- that's when the menu becomes completely unresponsive. None of the buttons will register being clicked on.

I am hoping to find any kind of solution to this since it has brought everything to a standstill for me. Is there an updated version of Unity that solves this issue, or is there any kind of workaround just so I can resume functionality for the game?

Thank you in advance.

Edit: I do not have the Ultimate Inventory System, but I thought it would be better to post in this thread rather than creating a similar one for the UCC forum.
 
Unfortunately this is a Unity bug within their code so we cannot work around it. Can you submit it to Unity so they can fix it?

Also, have you tried updating your Unity version? With that said, I mostly use the LTS versions because anything in between has a lot more issues. One other thing to try is removing your library folder and have Unity regenerate it. I'm not sure if that's related though.
 
For some reason the unresponsive UI was the result of the EventSystem. I had been running the game, but wanted to make sure that I had all the updated UCC stuff in the scene, so that's when I hit the "Setup Scene" button. The EventSystem stopped functioning even though everything looked fine, but after deleting it and adding it back manually, the UI started working again.

I just submitted the bug report for the issue to Unity about the ObjectPool Inspector problem, though.

Edit: Unity's official reply was to update the version of Unity to a supported version -- at least 2020.3 -- then see if the bug persists.
 
Last edited:
Top