Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

ParticleSystem.main: No Setter Methods

Discussion in '2018.2 Beta' started by Selzier, May 22, 2018.

  1. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    GetComponent<ParticleSystem>().startSize throws a warning:
    Warning CS0618 'ParticleSystem.startSize' is obsolete: 'startSize property is deprecated.Use main.startSize or main.startSizeMultiplier instead.'

    The documentation says I can set values of main:
    https://docs.unity3d.com/2018.2/Doc...ence/ParticleSystem.MainModule-startSize.html

    However, ParticleSystem.main does not have any setter methods:


    As such, I cannot resolve the warnings because I cannot Use main.startSize or main.startSizeMultiplier instead.
     
  2. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    var glowMain = glow.main;
    glowMain.startSize = 10;