Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug [Workaround] for 20.3/21.2 Edit Mode Broken after clicking save.

Discussion in 'Visual Effect Graph' started by peeweekVFX, Jan 8, 2022.

  1. peeweekVFX

    peeweekVFX

    Joined:
    Oct 19, 2015
    Posts:
    8
    Hello,

    I'm dropping that small snippet since it did do the job for me in the meantime the regression is fixed in both LTS 20.3 and 21.2. (Issue seem fixed in 2022.1, but not yet backported)

    TL;DR Problem:

    - Clicking save on the toolbar of a VFX saves it in runtime mode (which makes edits of values in graph *not* previewed real-time, but require instead saving to see changes). Using the force edit mode in preferences does not work around the problem, only closing and reopening the vfx graph window (until save is pressed again, to trigger the bug)

    The Workaround:
    - An asset postprocessor that is triggered upon save (reimport), checks the file name and compares to the one currently opened in VFX Graph, then sets it back to Edit mode automatically.

    How to install/remove:
    You can import the package in your project, then remove the workaround once it will be fixed.


    Not itdeal though, as it's "one more" asset postprocessor for your project.
    But hope that helps anyway,

    Edit: Seemed it had some problems with 2020.3, I uploaded an updated version
     

    Attached Files:

    Last edited: Jan 8, 2022
  2. peeweekVFX

    peeweekVFX

    Joined:
    Oct 19, 2015
    Posts:
    8
    Quick update: I have made some fixes to prevent exceptions to happen (especially when VFX is removed from project)
     

    Attached Files: