Can we use "struct" classes?
Here is the structure class code creating the issue; I'm loading this into a list to store, as it says, marker info for each individual marker I build and place.
Code: Select all
// meta data for building markers used for looping through and updating individual building marker properties.
public struct MarkerInfo
{
public GameObject attachedMesh;
public GameObject attachedLabel;
public GameObject attachedIcon;
public BuildingSummary buildingSummary;
public DFLocation.BuildingTypes buildingType;
public int buildingKey;
public Vector3 position;
public Color iconColor;
public MarkerGroups iconGroup;
public bool iconActive;
}
System.TypeLoadException: Invalid type DaggerfallWorkshop.Game.Minimap.Minimap/MarkerInfo[] for instance field System.Collections.Generic.List`1[DaggerfallWorkshop.Game.Minimap.Minimap+MarkerInfo]:_items
at (wrapper managed-to-native) System.RuntimeType.GetCorrespondingInflatedConstructor(System.RuntimeType,System.Reflection.ConstructorInfo)
at System.RuntimeType.GetConstructor (System.Reflection.ConstructorInfo fromNoninstanciated) [0x00014] in <fb001e01371b4adca20013e0ac763896>:0
at System.Reflection.Emit.ConstructorOnTypeBuilderInst.RuntimeResolve () [0x0000b] in <fb001e01371b4adca20013e0ac763896>:0
at System.Reflection.Emit.ModuleBuilder.RuntimeResolve (System.Object obj) [0x00080] in <fb001e01371b4adca20013e0ac763896>:0
at (wrapper managed-to-native) UnityEngine.GameObject.Internal_AddComponentWithType(UnityEngine.GameObject,System.Type)
at UnityEngine.GameObject.AddComponent (System.Type componentType) [0x00001] in <548b4fa0e7e04f27a1b7580930bfb7dc>:0
at UnityEngine.GameObject.AddComponent[T] () [0x00001] in <548b4fa0e7e04f27a1b7580930bfb7dc>:0
at DaggerfallWorkshop.Game.Minimap.Minimap.Init (DaggerfallWorkshop.Game.Utility.ModSupport.InitParams initParams) [0x0000b] in <78d967d110834cfa90d4a0b41766673d>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <fb001e01371b4adca20013e0ac763896>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)