FlowCanvas: Variables

NodeCanvas Forums Support FlowCanvas: Variables

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9472
    bbdata
    Participant

    Hei I’m just starting to use Flowcanvas for an AI-Mecanim-Script, most is pretty self explanatory and nice so far 🙂

    Problem is the Get / Set Variables in Scripts – how can I connect Flowcanvas with the public variables of a script on the same object?
    Currently I thought it just worked out with my try-and-error-scripted Get/Set to connect a variable, but now I get this nasty deserialization Error:

    Deserialization Error: ‘Cannot create an instance of an interface or abstract type for FlowCanvas.Nodes.ReflectedMethodNode’
    ‘ at ParadoxNotion.Serialization.FullSerializer.fsMetaType.CreateInstance () [0x0002a] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/Reflection/fsMetaType.cs:264
    at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.CreateInstance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType) [0x00007] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/Converters/fsReflectedConverter.cs:83
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x000ec] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:703
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_2_Version (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
    1& processors) [0x000f8] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:652
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x0004a] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:616
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x0003f] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:587
    at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00084] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/Converters/fsReflectedConverter.cs:70
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x0001d] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:745
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00034] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:737
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
    1& processors) [0x00109] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:716
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_2_Version (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x000f8] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:652
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
    1& processors) [0x0004a] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:616
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x0003f] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:587
    at ParadoxNotion.Serialization.FullSerializer.Internal.fsIEnumerableConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance_, System.Type storageType) [0x000b5] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/Converters/fsIEnumerableConverter.cs:67
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x0001d] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:745
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00034] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:737
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x00109] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:716
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_2_Version (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
    1& processors) [0x000f8] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:652
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x0004a] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:616
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x0003f] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:587
    at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00084] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/Converters/fsReflectedConverter.cs:70
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x0001d] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:745
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00034] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:737
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
    1& processors) [0x00109] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:716
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_2_Version (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x000f8] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:652
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
    1& processors) [0x0004a] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:616
    at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x0003f] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/FullSerializer/fsSerializer.cs:587
    at ParadoxNotion.Serialization.JSONSerializer.Deserialize (System.Type type, System.String serializedState, System.Collections.Generic.List1 objectReferences) [0x0003e] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/JSONSerializer.cs:57
    at ParadoxNotion.Serialization.JSONSerializer.Deserialize[GraphSerializationData] (System.String serializedState, System.Collections.Generic.List
    1 objectReferences) [0x00000] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Runtime/Serialization/JSONSerializer.cs:38
    at NodeCanvas.Framework.Graph.Deserialize (System.String serializedGraph, Boolean validate, System.Collections.Generic.List1 objectReferences) [0x0001b] in /Users/BPollux/Documents/GameDesign/GameProjekte/TurretsWay/Assets/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:88 ‘

    <b>Please report bug</b>
    UnityEngine.Debug:LogError(Object, Object)
    NodeCanvas.Framework.Graph:Deserialize(String, Boolean, List
    1) (at Assets/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:99)
    NodeCanvas.Framework.Graph:OnAfterDeserialize() (at Assets/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:49)

    #9477
    bbdata
    Participant

    Woa, sorry for this^ error listing, should be shortenend.. 😉

    my code:

    public virtual Vector3 actualVelocity
    {
    get { return actualVelocity; }
    set { actualVelocity = value; }
    }

    #9476
    Gavalakis
    Keymaster

    Hey 🙂

    You should be able to get a property by drag and droping the component on the canvas and selecting the property you want.
    Did you do that this way, or some other way, like for example through “Bound Variables” on the Blackboard, which should also work fine by the way.

    The error you post here is nasty and should not appear. Can you please do an export to json from the “File” menu and send it to me? info_at_nodecanvas.com.

    Thanks!

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

    #9475
    Gavalakis
    Keymaster

    Ahh..

    Also your property seems wrong. In your getter and setter you are creating a loop by getting and setting the property itself.
    It should be shomething like this:

    or this:

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

    #9474
    bbdata
    Participant

    Hey Gavalakis,

    thanks for your hints from last week, I had to take a break on this project for some days..
    I will try the new getter/setter. Formerly I thought that every public declared variable in a script is adressable, not only these with get/set-methods. So I guess I’ve missed some crucial basics 😉

    But: i love working with Flowcanvas, so some work is ahead of me but worth it. The serialization error isn’t reproducable in the actual project version, seems good. But diggin in sending/receiving events , i get a new error (see below) using the name ‘Eventhandler’ in my Script, should I use a namespace for my scripts?
    And is there any example how to subscribe with Flowcanvas to a given message bus and receive different types of messages? I’m a totally noob in terms of event handling, so every help is welcome.

    The error:
    Assets/FlowCanvas/Framework/_ParadoxNotion (shared)/Design/PartialEditor/EventHandlerDebugComponent.cs(16,61): error CS0426: The nested type SubscribedMember' does not exist in the typeEventHandler’

    BUT: I would make it without events, if I get this function working correctly: get_nextNodePosition. I assume problem is the “Nullable<Vector3>”, since I get sometimes the Flow Execution Error. It seems that I have to check if this function is != 0, before calling it, but how to to that?

    ->see screenshots
    https://www.evernote.com/l/AMG_6ycSE-VKK7yvvZZ75D5TS-ZBqUnIKO0

    #9473
    Gavalakis
    Keymaster

    Hello,

    If you also have an EventHandler class, it might be conflicting with the one in the ParadoxNotion.Services namespace, in case you also are using this namespace directive on top of your script. Otherwise it should not conflict. Let me know if that’s the case.

    Regarding the problem with Nullable, yeah :). It’s not handled correctly right now. The best workaround would be to use the ‘Cast’ node found under “Utilities/Converters” just after your property getter. You will then be able to use it as a normal Vector3 value.

    Please let me know what kind of Events example you are after if you still need them and I will post some for you 🙂

    Thanks!

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

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