Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
V3ndetta

How to access Particle System start size MinMaxCurve constant values?

Question

I am making a procedural starfield generator, and even though it's possible to set needed values already in the particle system's inspector fields, the artist who will use these has very little engine knowledge, and I'd like to have all changeable values done from the script, so he can just drag and drop my code and set it's values to make the field. However, I can not seem to be able to access my particle system's start size min and max values, and I could find no answers regarding this. If anyone knows how this value can be accessed, help is greatly appreciated.

 

Please login or register to see this code.

When declaring the SizeConstant variable, I cannot modify the min and max of my particle system's values, so I just added the same line twice, in hopes to find a reference to it, but to no avail.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 1

Ok I got what you mean now. Your looking for main module: Please login or register to see this link.

Share this post


Link to post
Share on other sites

  • 0

If I'm not mistaken, You have to store the emission and the rate and assign it

 

var em = StarEmiter.emission;

var rate = ParticleEmitter.MinMaxCurve(min, max);

em.rate = rate;

 

its pretty much much all in the docs: Please login or register to see this link.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

I have done that one, but what I am trying to do is to change the start particle size which is set to a constant with a min and a max value from my script. Following it as an example. The link shows how to change the emission rate, but I could not find a way for the start size yet.

Edited by V3ndetta

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

So the first link's "Emission Module" name now makes sense. I never knew the particle system was split up like this. Many thanks!

Share this post


Link to post
Share on other sites
  • 0

It used to be very straight forward in unity4< but has gotten to be kind of mess since then. Line renderers have also taken a deeper dive into the trash can.

 

np

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...