FSM Initialize

NodeCanvas Forums General Discussion FSM Initialize

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16681
    mreko
    Participant

    image-2

    Is there any way to optimize FSM initialization?

    The first moment when my enemy spawns FSM takes so much time for the first action. Is there any way to improve it?
    I use Async First Activation 

    Attachments:
    You must be logged in to view attached files.
    #16712
    Gavalakis
    Keymaster

    Hello,

    Can you please show a screenshot of your FSM and also expand on the ‘FSMState.OnExecute’ in the profiler to see what is actually causing this. It seems this is not from initialization, but rather from what the FSM STATE is actually doing in its execute.

    Let me know.

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

    #16741
    mreko
    Participant

    Hello,

    Here is my screenshots of my FSM and more info about FSMState.OnExecute

    Attachments:
    You must be logged in to view attached files.
    #16746
    mreko
    Participant

    Hello,

    Here is my screenshots of my FSM and more info about FSMState.OnExecuteimage-3
    image-4
    image-3
    image-5
    image-6

    Attachments:
    You must be logged in to view attached files.
    #16754
    Gavalakis
    Keymaster

    Hello again,

    Just to confirm, are you only getting these hits once, and when the graph is initialized I assume?

    Please note that the Async loading currently only async loads the root graph without its sub-graphs (async loading the whole graph with its subgraphs is in the todo by the way). Since initialization/deserialization does indeed require resources, may I suggest that you enable the “Pre Initialize SubGraphs” and pre-instantiate the gameobject for example when the game/scene loads rather than dynamically? Would that be possible in your setup?

    (I will rush up the Async loading of sub-graphs by the way for the next version)

    Let me know. Thank you.

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

    #16760
    mreko
    Participant

    Hello,

    Yes, these hits we only see once
    Tanks for information about Async loading of sub-graphs. We tried to use “Pre Initialize SubGraphs” but it doesn’t work in our case
    We will look forward to the next update

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