Binded Variables on iOS

NodeCanvas Forums Support Binded Variables on iOS

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #9874
    Matt Newcombe
    Participant

    Binded Variables appear to not work correctly on iOS, is this due to reflection?

    #9881
    Gavalakis
    Keymaster

    Hello,

    Are you refering to the variable binding done within the blackboard, or the legacy component usage “Blackboard Property Binder”.
    If you are using the “Blackboard Property Binder”, please consider using the new way of binding variable to a property which is done by the small button on the far right of each variable in the blackboard GUI.

    The new way, doesn’t really use reflection other than creating a delegate and is far more efficient.
    If you are refering to the new binding way, can you please provide what the error showing is if any?

    Thanks

    Join us on Discord: https://discord.gg/97q2Rjh

    #9880
    Matt Newcombe
    Participant

    Hey,

    Sorry for the late response, even using the new binding variables doesn’t work on iOS. I believe this is due to AOT compliation rendering any use of Reflection in the actions as redundant, which ultimately means that this action can’t be run on iOS based devices.

    It would be cool if NodeCanvas could mark up what actions are not supported depending on the target platform that is selected or similar.

    #9879
    Gavalakis
    Keymaster

    Hello,
    That is very weird, iOS supports reflections and delegates, though it doesnt runtime compiled code, but a delegate is not that.
    Actualy the whole code for the new way of binding variables is summed up to this:

    I don’t think there is something that is not supported in iOS in the above lines.

    Can you please share what is the error showing?

    Thanks

    Join us on Discord: https://discord.gg/97q2Rjh

    #9878
    Matt Newcombe
    Participant

    Sorry ignore previous message, not sure how to delete it.

    Ok so the test case is super simple, empty scene, one game object, behaviour tree graph with a vector bound to the transform position, as in the attachment.

    In the editor this runs perfectly fine, the object floats up as expected,
    On an iOS build, the behaviour tree errors with:

    ExecutionEngineException: Attempting to JIT compile method ‘(wrapper delegate-invoke) System.Func1<UnityEngine.Vector3>:invoke_Vector3__this__ ()’ while running with –aot-only.

    at NodeCanvas.Variables.VariableData1[UnityEngine.Vector3].GetValue () [0x0000b] in /Users/matthew.newcombe/work/frodo/Client/Assets/Plugins/NodeCanvas/Core/Blackboard/VariableData.cs:83

    (Filename: /Users/matthew.newcombe/work/frodo/Client/Assets/Plugins/NodeCanvas/Core/Blackboard/VariableData.cs Line: 83)

    <b>Graph Error:</b> ‘Infinite Loop Detected’ On node ‘<color=#bf7fff>SEQUENCER</color>’ ID 1 | On graph ‘BehaviourTree’

    Full stack at https://gist.github.com/newcommat/78ab1cc5ef78ba335c67

    #9877
    Gavalakis
    Keymaster

    Hello again and sorry for the late reply,

    Thanks for the provided detailed information.
    One possible solution would be to set the API Compatibility level to ‘.NET 2.0 Subset’
    (Edit/Project Settings/Player)

    I will also include some platform checks for binded variables so that it works in iOS in any case, but through Invoke reflection call.

    Thanks,
    Gavalakis Vaggelis

    Join us on Discord: https://discord.gg/97q2Rjh

    #9876
    Matt Newcombe
    Participant

    Cool! The API Compatibility level is already set to .NET 2.0 Subset unfortunately.

    #9875

    Hello,

    Any resolution to this? I am having similar trouble, this time when executing a function as first action.

    Thanks in advance.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.