Load Balancer Reflection Error in 2017.2

  • October 12, 2017 at 18:36 #22177
    zboyet
    Participant

    Getting this error since upgrading to Unity 2017.2

    ReflectionTypeLoadException: The classes in the module cannot be loaded.
    System.Reflection.Assembly.GetTypes () (at <9c9f068c46c64ffd91fda7af157b4d15>:0)
    Apex.LoadBalancing.LoadBalancerComponent.<ResolveLoadBalancers>b__3 (System.Reflection.Assembly asm) (at c:/Development/Apex Applications/ApexGameTools/Source/ApexShared/ApexShared/LoadBalancing/LoadBalancerComponent.cs:124)
    System.Linq.Enumerable+<SelectManyIterator>d__170
    3[TSource,TCollection,TResult].MoveNext () (at <11c1c8f1ba1046b191f565f88728429e>:0)
    System.Linq.Enumerable+WhereSelectEnumerableIterator
    2[TSource,TResult].ToArray () (at <11c1c8f1ba1046b191f565f88728429e>:0)
    System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at <11c1c8f1ba1046b191f565f88728429e>:0)
    Apex.LoadBalancing.LoadBalancerComponent.ResolveLoadBalancers () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexShared/ApexShared/LoadBalancing/LoadBalancerComponent.cs:123)
    Apex.LoadBalancing.LoadBalancerComponent.OnAwake () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexShared/ApexShared/LoadBalancing/LoadBalancerComponent.cs:64)
    Apex.SingleInstanceComponent
    1[T].Awake () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexShared/ApexShared/SingleInstanceComponent.cs:26)

    • This topic was modified 2 months ago by zboyet.
    October 15, 2017 at 14:27 #22189
    Geminior
    Keymaster

    Did you update Apex Utility AI to the 2017 version?

    October 15, 2017 at 20:09 #22191
    zboyet
    Participant

    It is the latest version available on the asset store. It works in 2017.1 and I have since rolled back to 2017.1 to get the AI working again.

    October 16, 2017 at 10:28 #22194
    Geminior
    Keymaster

    Ok, thanks for reporting.
    We will investigate this as soon as possible.

    November 1, 2017 at 18:40 #22298
    zboyet
    Participant

    Any progress on this? I am getting a lot of crashes on 2017.1 and would really like to upgrade to 2017.2 but it is impossible with this error.

    November 2, 2017 at 12:25 #22307
    Geminior
    Keymaster

    I have now tried upgrading a 2017.1 project to 2017.2 and have had no issues doing so.
    Type load exceptions usually happen due to missing dependencies.

    Create a component run the following in its awake:

    try
    {
    var sources = (from asm in AppDomain.CurrentDomain.GetAssemblies()
    from t in asm.GetTypes()
    select t).ToArray();
    }
    catch(Exception e)
    {
    //Inspect exception here.
    Debug.Log(e.Message)
    }

    Set a break point, attach, run and inspect the exception given to figure out which assembly is causing issues and why.

    November 2, 2017 at 18:08 #22309
    zboyet
    Participant

    Thanks for the help sorting this out. It looks like it was Rewired fouling things up. Thankfully after updating it everything seems to be running normally.

    • This reply was modified 1 month, 1 week ago by zboyet.
    November 28, 2017 at 21:03 #22516
    MH6
    Participant

    I am getting this same error when I build my project in Unity 5.6.3. It only occurs with a build, the game inside the editor works fine. And yes, all necessary DLLs are included in the Managed folder.

    EDIT: I fixed the error by changing the Api Compatibility Level in the Player Settings from .NET 2.0 Subset to .NET 2.0 and rebuilding.

    • This reply was modified 2 weeks, 3 days ago by MH6.

You must be logged in to reply to this topic.