Converting FSM from Bound to Asset retains scene reference

NodeCanvas Forums Support Converting FSM from Bound to Asset retains scene reference

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15978
    deprecated person
    Participant

    To reproduce, create a bound FSM with an Action “Destroy GameObject” and drop in any scene ref to destroy.
    Then save the FSM as an asset, delete the bound graph and assign the FSM asset, then run. This keeps on working! Which can be misleading because it will break as soon as you open any other scene.

    The graph popup correctly tells me that I can’t have scene refs in an asset graph – but doesn’t actually remove the ref. It just keeps on complaining.

    GraphRefactor will also not catch any issues with the graph, see image. It’s probably not designed to do so.

    What I would expect:

    • A warning or even ability to refactor a graph when saving it as an asset graph when it contains scene refs. For instance, turn any scene refs into corresponding blackboard variables which user then has to assign with other asset refs.
    • In any case, the asset graph shouldn’t “randomly break at a later time” which may be hard to understand by developers. It should be broken right away, possibly flagged for refactoring/auditing. At a minimum, scene refs in an asset graph should be nulled or highlighted.

    Tested with Unity 2021.2.1 in the URP sample scene. This is my FSM saved as an asset, the Safety Hat ref remained until I opened another scene.

    #15979
    deprecated person
    Participant

    Copy/pasting an image apparently doesn’t work. Trying with a pasteboard:
    https://pasteboard.co/FcJ4wGeBHzzv.png

     

    #15992
    Gavalakis
    Keymaster

    Hello there,

    You are right. The reference remains after the steps you’ve described and can be misleading. I’ve noted this down to take a look at it so that at the very least the saved asset graph does not retain the scene references.

    Thanks for letting me know of this.

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

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