Search Unity

How to set Visual Effect Line Property from Code?

Discussion in 'Visual Effect Graph' started by Reticulatas, Dec 2, 2020.

  1. Reticulatas

    Reticulatas

    Joined:
    Jul 31, 2012
    Posts:
    25
    upload_2020-12-2_13-2-0.png

    There's no
    VisualEffect.SetLine()

    I thought maybe
    VFXGraph.SetVector3("Line1.start", fooPosition);

    But that doesn't work either.
     
  2. Reticulatas

    Reticulatas

    Joined:
    Jul 31, 2012
    Posts:
    25
    I figured it out, didn't realize you could enumerate the properties on the asset.

    Lines are bound with the name
    <line name>_start
    and
    <line name>_end