Modify Texture Sheet Animation Module via script

What I need to do in order to get access and modify the “Row” parameter in Texture Sheet Animation Module in Shuriken Particle System? The documentation says “You can use the Single Row mode to create separate animation sequences for particles and switch between animations from a script.” (Unity - Manual: Texture Sheet Animation module) that it is possible but does not specify via which components I have to go.

Does anybody have a clue?

The reason I need this is I have a Texture Sheet with one single row with Numbers from 0-N and I want to my particle emitter emits specific numbers when player hits the enemy with specific damage value.

Thanks in advance.

  • Change the “Whole Sheet” drop down to “Single Row”
  • Deselect “Random Row” - unless thats what you want
  • Enter the row number :smile:

Oh man. No it’s not what I want :frowning: I want to change the “Row” property via script. Which means I want to know how I can access/get Texture Sheet Animation Module component and access and modify its Row value :slight_smile: I.e. if it’s still not clear way how to do TextureSheetAnimation textSheet = XYZ.GetComponent().row = 5

Hi. In 5.3 we have a much improved Particle System API which allows access to textureSheetAnimation, if you have a pro licence you can try the beta out now otherwise the release date is December.

1 Like