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.

Visual graph property check if exists

Discussion in 'Visual Effect Graph' started by Shiv7n, Jul 19, 2021.

  1. Shiv7n

    Shiv7n

    Joined:
    Jan 11, 2019
    Posts:
    5
    Hello,

    Is there any way to programatically check if there is a property in VFX graph?

    visualEffect.SetInt("SpriteCount", spriteCount); // this code will throw 'SpriteCount' not found error because I don't have property like that on my VFX graph.

    Is there any method if property even exist?
     
  2. Shiv7n

    Shiv7n

    Joined:
    Jan 11, 2019
    Posts:
    5
    Nevermid - there is a 'HasInt" etc methods available.