Search Unity

Instantiating a GameObject with a VisualEffect component will not apply the playRate of the original

Discussion in 'VFX Toolbox' started by NTG-SAnderson, Nov 15, 2019.

  1. NTG-SAnderson

    NTG-SAnderson

    Joined:
    Sep 13, 2019
    Posts:
    3
    Code (CSharp):
    1. g = new GameObject();
    2. VisualEffect visualEffect = g.AddComponent<VisualEffect>();
    3. visualEffect.playRate = 10f;
    4.  
    5. _g = GameObject.Instantiate( g );
    6. VisualEffect _visualEffect = _g.GetComponent<VisualEffect>();
    7.  
    8. Debug.Log( visualEffect.playRate ); // 10.0
    9. Debug.Log( _visualEffect.playRate ); // 1.0
    Just, why?