Quantcast
Channel: Latest Questions by username132323232
Viewing all articles
Browse latest Browse all 58

Can't Set Particle System TextureSheetAnimationModule.

$
0
0
I would like to set Particle System TextureSheetAnimationModule.rowIndex. Here's the code based on Unity reference (https://docs.unity3d.com/ScriptReference/ParticleSystem.TextureSheetAnimationModule-rowIndex.html): ParticleSystem ps = particleEffect.GetComponent(); ParticleSystem.TextureSheetAnimationModule tex = ps.textureSheetAnimation; tex.rowIndex = 2; It doesn't work and generates this error: NullReferenceException: Do not create your own module instances, get them from a ParticleSystem instance UnityEngine.ParticleSystem+TextureSheetAnimationModule.set_rowIndex (Int32 value) Am I doing something wrong or is Unity reference out of date? I have Unity 5.5.2f1.

Viewing all articles
Browse latest Browse all 58

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>