Accessing GlobalBlackboard Variables from C# script

FlowCanvas Forums Support Accessing GlobalBlackboard Variables from C# script

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3544
    spayke
    Participant

    Can you please give example of how to get Global Blackboard Variables, from C# script?(couldn’t find it in documentation)

    Also if there will be script on many scene gameobjects, can C# script get Global FC Variable without setting that blackboard field to the each script manually? For example how other FC scripts can see Global blackboard vars, so maybe C# script somehow can see them too, is it possible?

    Thank you

    #3545
    Gavalakis
    Keymaster

    Hey,

    You can get a Global Blackboard’s Variable like this for example:

    In the ‘GlobalBlackboard.Find’ you have to pass the identifier name of the Global Blackboard (as set in its inspector). Then you can use the ‘GetVariableValue` method to get the value of a variable. T has to be the type of the variable and you of course have to pass the name of the variable as the example above 🙂

    Let me know if that is what you were after. Thanks.

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

    #3549
    spayke
    Participant

    Yes, this is exactly what I needed, thank you!

    #3565
    Gavalakis
    Keymaster

    You are welcome 🙂

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

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