Flow Canvas API Documentation Needed

FlowCanvas Forums Support Flow Canvas API Documentation Needed

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1867
    louisgamedev
    Participant

    Hi, the context is I’ve spent an hour looking around for resources and learning the intricacies of FlowCanvas before purchasing. Your documentation page on FlowCanvas is fantastic, but without API documentation, I cannot decide if FlowCanvas can successfully integrate into my existing code base.

    #1868
    louisgamedev
    Participant

    As the name suggests, this component is responsible for controlling a flowscript and you have to add it on a game object that you wish to be controlled by a flowscript. Although this is not really mandatory, it’s the easiest and the most suggested way to get started quickly. Quoted

    I intend to use FlowCanvas as a scripting language in my own code base rather than bound to Unity GameObjects. It is briefly mentioned in the documentation that a FlowScriptController is not necessarily needed, which is interesting but I could not find any more explanation of what not using a FlowScriptController would be like.

    Thank you for your time

    #1869
    louisgamedev
    Participant

    I took a leap of faith but was happy to find out flowCanvas works fine as a stand alone scripting language!

    Using a bootstrap code it’s possible to run without the need for a MonoBehavior (aka FlowScriptController) to be attached to a game object. I needed this to run flowCanvas in my ScriptObject instead of MonoBehavior.

    Flow graph used

    #1873
    Gavalakis
    Keymaster

    Hello Louis (I presume that is your name πŸ™‚ )

    You got me before having the chance to reply! Thanks a lot for getting FlowCanvas πŸ™‚
    Indeed, a FlowCanvas graph (flowScript), can run as a standalone graph without the need of a FlowScriptController pretty much in the exact way you’ve done it as well!

    I will need to add this in the documentation as well since I have omitted doing so (only have done so for the [NodeCanvas Documentation] which is pretty much similar)

    As you’ve already seen, after instantiating, the StartGraph method takes two important parameters those being the agent (Component) and the blackboard (IBlackboard).

    — You can pass any component reference to act as the agent (“Self”) for the graph (if required).
    — For the blackboard, you can either do what you did, or if you also want to have the variables serialized and inspectable in the editor, you could also create a Blackboard component (either editor or runtime) and pass that Blackboard component reference instead.

    A blackboard is though not required if you don’t want to pass a reference. If you pass “null”, the local blackboard of the graph will be used instead, within which you can get/set variables normally as you would with any blackboard, through the graph.blackboard (or graph.localBlackboard) property.

    Another thing you can do if you want to have the blackboard variables part of the graph asset as well, would be to do a little code change so that the graphs use their local blackboard by default (this will be an option in a future update). To do so, simply open up FlowScript.cs and add this line of code:

    Doing so, when you open your graph asset, you will now see a blackboard being part of the graph, rather than empty πŸ™‚

    I hope that helps and please let me know if you have any questions!

    By the way, the UI seems a bit weird in your screenshot (white halos and pixel artifacts). What version of Unity and what OS are you using?

    Thanks!

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

    #1875
    louisgamedev
    Participant

    Very informative reply, thanks! Your code is well written so it was easy for me to use and modify, glad I figured it out.

    I want to request a generated API documentation so people like me can figure out the API before buying, and it’ll also be useful during development as well.

    My OS is Windows 10, Unity version 2018.2.0f1.

    #1887
    Gavalakis
    Keymaster

    Hello again,

    Sorry for the late reply and thanks for your positive feedback!
    Sure. I can upload a generated API documentation. Will do so just after the changes for the new version are done πŸ™‚

    Thanks again!

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

    #1900
    dave
    Participant

    Hi. I am working on a debuggingtool using the APIs . It would be helpful if the Commenteries in the classes which you nicely put everywhere ,if they would be enclosed in ///<summary></summary> – tags, so that the IDE would immediately show them as a short description. at the moment one has to go to the definition of the member/method to read your helpful comments.
    Should be autorefactoring I guess – Could we have that in the next version by default?
    πŸ™‚
    Best Regards, David

    #1905
    Gavalakis
    Keymaster

    Hey,

    I honestly find “summary” blocks to be very ugly and taking too much space for my tastes, but normal “///” comments should also work for descriptions the same. I know they do in Visual Studio Code and Monodevelop (I use VS Code). There might be an option in Visual Studio as well if that is what you use, but I am not sure. πŸ™‚

    Thanks!

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

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