Apex Utility AI with Unity 2017 ??

  • July 30, 2017 at 11:17 #21527
    Christian
    Participant

    Hi,
    loading my project with Apex Utility AI into Unity 2017 gives me the error:

    Assembly: ‘C:/Proj/Assets/Apex/Apex Binaries/Editor/ApexSharedEditor.dll’ uses obsolete Unity API (UnityUpgradable)
    Assembly: ‘C:/Proj/Assets/Apex/Apex Binaries/Editor/ApexAIEditor.dll’ uses obsolete Unity API (UnityUpgradable)
    API updating failed. Check previous console messages.

    The result is, that I couldn’t open the AI design editor window.

    Is there a fix?

    Thanks!

    Regards
    Christian

    July 30, 2017 at 17:01 #21532
    anabeces
    Participant

    I have had this problem for a week now. Are you guys going to fix this?

    July 31, 2017 at 16:22 #21553
    Geminior
    Keymaster

    We will provide an update for Unity 2017 as soon as possible.
    When exactly that is I cannot say at this point.

    August 5, 2017 at 10:51 #21639
    Christian
    Participant

    Great! Thanks!

    August 6, 2017 at 11:19 #21656
    Christian
    Participant

    After moving my entire project to 2017 I got the following error:

    FileNotFoundException: Could not load file or assembly ‘ApexShared, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
    System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MonoCustomAttrs.cs:108)
    System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MonoCustomAttrs.cs:151)
    System.MonoType.GetCustomAttributes (System.Type attributeType, Boolean inherit) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MonoType.cs:595)
    UnityEngine.AttributeHelperEngine.CheckIsEditorScript (System.Type klass) (at C:/buildslave/unity/build/Runtime/Export/AttributeHelperEngine.cs:131)

    Any hint?

    Thanks!

    August 6, 2017 at 18:52 #21659
    Geminior
    Keymaster

    That is a standard type load error, so make sure the assembly is actually there.
    You may simply want to remove the old Apex Utility AI before importing the update.

    August 7, 2017 at 09:51 #21665
    Christian
    Participant

    Thanks! So after several tries the error is gone. Now I have problems opening my ai files from the former apex version. They are removed from Name Map and couldn’t be added by Apex Ai Settings. Also manually inserting the GUIDs from former version doesn’t work.

    How could I use and activate the of AI’s of former Apex?

    Perhaps this is important: during the first load an error with 2d images occured:

    MissingMethodException: Method not found: ‘UnityEngine.Texture2D.LoadImage’.
    Apex.AI.Editor.PngResource.get_texture () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexAI/ApexAIEditor/Resources/PngResource.cs:39)
    Apex.AI.Editor.EditorStyling+Canvas.SetTextures () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexAI/ApexAIEditor/EditorStyling.cs:374)
    Apex.AI.Editor.EditorStyling.SetTextures () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexAI/ApexAIEditor/EditorStyling.cs:35)
    Apex.AI.Editor.EditorStyling.InitScaleAgnosticStyles () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexAI/ApexAIEditor/EditorStyling.cs:21)
    Apex.AI.Editor.AIEditorWindow.OnGUI () (at c:/Development/Apex Applications/ApexGameTools/Source/ApexAI/ApexAIEditor/AIEditorWindow.cs:773)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:272)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:265)
    UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:232)

    Thanks!

    August 8, 2017 at 20:53 #21684
    Christian
    Participant

    … any newly created ai with Unity 2017.1 works as expected and could be edited … but if I create one with Unity 5.6.2 (both Unity versions have the newest Apex AI Utility) and copy it to 2017.1 it couldn’t be opened!

    Is there any conversion/integration necessary?

    August 8, 2017 at 21:27 #21686
    Geminior
    Keymaster

    AIs contain type information (but is not versioned) so all types must be present for an AI to load.
    However if what you are seeing is the error from your previous post, then it has nothing to do with that.

    We have no issues opening old AIs in 2017.1 so I simply have no idea what is going on here. That error does suggest that there is something wrong with the referenced Unity dll, UnityEngine.Texture2D.LoadImage does exist in Unity 2017.1, it is an extension method.

    Did Unity ask to run its upgrade tool, and did you allow it?

    August 9, 2017 at 20:02 #21696
    Christian
    Participant

    I did the upgrade with my project.

    Now I tried a very simple example:

    I have two PCs, one with Unity 5.6.2 and one with Unity 2017.1. On both I created a new project only with the newest Apex Utility AI version (1.0.7.1). On each PC I created one new AI with the default selector and saved them with different names. Each AI could be opened. Afterwards I copied the AI asset and the AI asset meta of the Unity 5.6.2 project to the same folder of the AI asset of the Unity 2017.1 project.

    If I click on the copied AI asset in Unity 2017.1 the Inspector remains empty (no open possible). The Name Map contains only the AI asset created with Unity 2017.1. Same with Apex AI Repair ….

    There was no error reported.

    I’m a little bit confused …. Thanks for any further hint.

    August 9, 2017 at 21:16 #21698
    Geminior
    Keymaster

    Seeing as the AI has no affiliation with a specific Unity version, that is certainly odd. As mentioned we have not seen any such issue.
    Can you please send both the example AIs to support(at)apexgametools.com

    August 9, 2017 at 22:24 #21700
    Geminior
    Keymaster

    I have just successfully copied the TestMe.asset you sent, into a 2017.1 project and it opened no problem.
    No need to copy meta files for AI assets though, but that is not the issue.

    Seeing as I am unable to reproduce this problem, it suggests something is up with your Unity installation.

    August 11, 2017 at 16:44 #21714
    Christian
    Participant

    Thanks for your time! What did you do other than me?

    I uninstalled Unity 2017.1 and reinstalled it again. The AI from 5.6.2 (TestMe) doesn’t still work. No Inspector content, empty field. Then I uninstalled it again and installed the beta 2017.2b6. Same, but now I have an error message:

    ArgumentNullException: Argument cannot be null.
    Parameter name: obj is null
    UnityEditor.AssetDatabase.IsNativeAsset (UnityEngine.Object obj) (at C:/buildslave/unity/build/artifacts/generated/common/editor/AssetDatabaseBindings.gen.cs:92)
    UnityEditor.Editor.IsAppropriateFileOpenForEdit (UnityEngine.Object assetObject, System.String& message) (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:641)
    UnityEditor.Editor.IsAppropriateFileOpenForEdit (UnityEngine.Object assetObject) (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:634)
    UnityEditor.InspectorWindow.<DrawPreviewAndLabels>m__1 (UnityEngine.Object a) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:763)
    System.Linq.Enumerable.Any[Object] (IEnumerable1 source, System.Func2 predicate)
    UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:763)
    UnityEditor.InspectorWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:398)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:283)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:276)
    UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:243)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

    Any idea?

    PS: The AIs created with 2017.1 are working great.

    • This reply was modified 2 months, 1 week ago by Christian.
    August 13, 2017 at 16:38 #21722
    Geminior
    Keymaster

    I have done nothing special, simply copied the AI to a 2017.1 project.
    So I am afraid I have no clue why you experience issues.

    August 14, 2017 at 08:06 #21724
    Christian
    Participant

    hmmm … so I tried it with a new installation of Unity 2017.1 on a third computer (windows 7), a new fresh project with only apex utility ai and copied the AIs to the AI-folder. But still the same problem … only the 2017.1 generated AIs could be opened. The Inspector of the AIs generated with Unity 5.6.2 remains empty (no open-button).

    Do you have a Mac or a Windows-PC?

    Is there any export/import (e.g. json) available?

    • This reply was modified 2 months, 1 week ago by Christian.

You must be logged in to reply to this topic.

Topic Tags