- Home /
Question by
lampshade · Jun 26, 2010 at 12:15 AM ·
particleanimator
Convert ParticleAnimator [] type to ParticleAnimator type
Hi,
The title of this post is exactly the question.
ParticleAnimator [] emitters ;
ParticleAnimator myEmissions ;
emitters = (ParticleAnimator []) myEmissions; // The Obvious Error
What I am trying to acheive can be found here at this post: http://answers.unity3d.com/questions/13559/controlling-a-gameobject-instantiated-particlesystem-prefab
Comment
@lampshade, it would be better to edit your previous Question rather than asking a basically identical Question twice: http://answers.unity3d.com/questions/13621/invalid-cast-exception-error-on-instantiation
Best Answer
Answer by Mike 3 · Jun 26, 2010 at 12:18 AM
Should be just this:
ParticleAnimator[] emitters = new ParticleAnimator[]{myEmission}
Where myEmission is your single particle emitter
Not entirely sure why you're trying to do that, but it should work