#Custom data structure crashes Unity Editor UI

1 messages · Page 1 of 1 (latest)

wet badger
#

Hi all! I am hoping somebody can give me an idea of how to go about fixing this.

I have a psuedo-dictionary class I build that holds <string, boolean> pairs. The idea is to give me an easy way to reference and then convert the the psuedo-dictionary into a dictionary. This was working just fine before I updated to 6000.2.6f2 so I think it must have something to do with that. If I try to open this data structure to look at the values while the game is running, I get several errors I don't have the first idea how to deal with.

#

and a partitial class for use with Unity Fan.Unity.cs

#if UNITY_EDITOR
using UnityEngine;

namespace DMBTools
{
    [System.Serializable]
    public partial class Feather
    {}
}
#endif
#

And the console errors

  1. GetName - I don't call GetName anywhere that I can see. It looks like HotReload, a resource that I cannot remove because it isn't located in the Assets/ folder
UnityException: GetName can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
UnityEngine.Object.GetName () (at <7b8172fcdd864e17924794813da71712>:0)
...
  1. We have some kind of problem with the dictionary here referencing an null entry, but it seems that the problem is in the Unity UI elements, not in my code.
NullReferenceException: Object reference not set to an instance of an object
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <59bd7c40c082431db25e1e728ab62789>:0)

...

UnityEngine.UIElements.UITKTextJobSystem+PrepareTextJobData.Execute (System.Int32 index) (at <58affde3b6cc47f39fa7e8b94d5890c0>:0)
  1. This warning looks like something to do with the Unity UI, not my code.
MeshGenerationContext is assigned to a VisualElement after calling 'UnityEngine.UIElements.UIR.MeshGenerationCallback'. Did you forget to call 'End'?
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

There are more, but none of them seem to be referencing my code. However if I run my game and try to open up my Fan to look at my <string, bool> pairs, Unity throws these errors.

#

Here is what the UI and errors look like

hollow dome
wet badger
#

Thanks I will give it a try!