Search Unity

How to detect Visual Effect component property changes in custom editor?

Discussion in 'Visual Effect Graph' started by lorewap3, May 8, 2022.

  1. lorewap3

    lorewap3

    Joined:
    Jun 24, 2020
    Posts:
    58
    Greetings!

    I make alot of custom tools for our team to speed up workflow. I'm trying to implement one which makes use of VFX graph. Or more specifically, it's a custom editor that shows the visual effect component, not the vfx graph itself. The intent is give a central place for tweaking parameters across many different prefabs.

    However, I'm not sure how to detect changes that are made. I'm doing Editor.CreateEditor(VisualEffectComponent) to create the editor, and calling OnInspectorGUI to draw it in between a Begin/EndChangeCheck.

    That method works for Transforms and the normal ParticleSystem component, but not for the Visual Effect component.

    Does anyone know how I can detect changes made to any of the exposed properties in a custom editor such as this?

    Thank you!
    Will
     
  2. lorewap3

    lorewap3

    Joined:
    Jun 24, 2020
    Posts:
    58
    Bump! If anyone's done any custom editors with visual effect component please let me know!