MethodAccessException after updating Utility AI and Path

  • September 8, 2018 at 04:51 #23730

    My team recently updated from a fairly old 2017 version of Unity to 2018.2.6f1 and updated our Apex assets at the same time. I am not sure which version of the various Apex assets we were on previously but we haven’t updated in several months, at least.

    Immediately after updating, we have started getting the following error at runtime, both from Utility AI when a UtilityAIClient is started (shown here) and in Apex Path when attempting to initialize the LoadBalancer for Path.

    MethodAccessException: Method”Apex.LoadBalancing.LoadBalancedQueue..ctor(int,single,int,int,bool)” is inaccessible from method”Apex.AI.AILoadBalancer..cctor()”
    Apex.AI.AILoadBalancer..cctor () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexAI/ApexAI/AILoadBalancer.cs:15)
    Rethrow as TypeInitializationException: The type initializer for “Apex.AI.AILoadBalancer” threw an exception.
    Apex.AI.Components.UtilityAIClient.Start ()

    Seeing this, I would guess that a DLL was missing, but as far as I can tell we have all the required DLLs right where they should be.

    Any idea what’s going on here, or how we can fix it? Thanks for your time.

    • This topic was modified 9 months, 1 week ago by alyssastx. Reason: Edited for code formatting
    • This topic was modified 9 months, 1 week ago by alyssastx.
    • This topic was modified 9 months, 1 week ago by alyssastx. Reason: Still trying to get the formatting right
    September 10, 2018 at 03:31 #23738

    Just to add a bit to this – I updated Utility AI to the latest version via the link in the other thread (the one about licenses not working).

    The upgrade was done in the “best practice” way of fully deleting the old version of Apex UAI before importing the new version (so there aren’t any ghost files or old files floating around).

    Doing some testing, I dropped an empty game object into a new scene, attached just the load balancer script to it, and ran the scene and this error also happens.

    September 10, 2018 at 10:50 #23742

    My best guess would be that you have multiple versions of ApexShared.dll.
    Both Apex Path and Apex Utility AI come with that dll.
    Make sure there is only one instance of this dll in the project.

    If you purchased the Utility AI from the Asset Store, you should get the latest version from there.
    The link you refer to may be out of date, it was meant for those who had purchased via our web store.

    September 10, 2018 at 11:58 #23746

    I did purchase from the web store, not the asset store.

    We won’t be able to switch to the asset store version since that appears to use the standard Editor License (1 license per person who has access to source control last I checked with no ability to transfer licenses outside of the organization, which hinders working with contractors too much to be viable for us) instead of the license you guys had via the web store (one license per person using the AI Editor stuff).

    Not to mention I don’t think there’s a way to convert. So I assume the version from the link is just the last updated version we’ll get.

    It looks like the linked version has the same date as the asset store’s last updated date though (2/4/2018).

    I’ll try going into my asset update project and install UAI in isolation and see if that works, then test again with Path.

    September 10, 2018 at 12:11 #23748

    Looks like I got it sorted. I think it was just a weird conflict where Path (or maybe one of the other assets like steering) may have overwrote a file (probably dll) with an incompatible version.

    I overwrote the project apex binaries with the folder from my isolated project (that only had the Utility AI installed) and the error is no more!

    September 10, 2018 at 13:33 #23750

    Ok glad you got it sorted.
    Just to clarify licensing. We abandoned the subscription model and all other types of licenses than the personal. Each individual using the AI editor should have a license.

    And you are correct, the version linked is the latest version, and is identical to the one on the asset store.
    If you drop us a message at support(at) I can simplify the process of getting the latest version for you.

The forum ‘Apex Utility AI’ is closed to new topics and replies.