assign n gameobject and change value?

20283-1.png
20284-2.png

okay, those screenshots may help you to understand what I mean.
say, I have four gameobject(particly system) which shows my spaceship thruster.
I want to assign them into one script as element0, ~ , element3.
when I press forward key, then change the start size to 0.7, like I used booster or sth.
I’m pretty newb to unity and don’t know what I need to do.

  1. assign number of gameobjects into one script(they are all particle system).
  2. when I press forward(<-I know how to do this) then the script changes the start size to [numberIwant].

these are what I want to achieve.
I don’t know:
how to assign gameobject as var(am I correct?) and change its var.
please help me :slight_smile:

To reply with your questions:

Write a script and public a field to your particle system type, then drag and drop the particle to that field in editor. Then in your “press key”, use that field to change variable to what you want. Let me write a pseudo code for you:

public ParticleSystem ParticleSystem_Reference_1;

void Update()
{
  if(Input.GetButtonDown("[F]"))
  {
    ParticleSystem_Reference_1.StartSize = 0.9 //whatever you want
   }
}

I’m new to Unity as well, so this might just get you started.