What controls the order in which a for stament goes through variables?

What decides the order in which the various GameObjects in guns that are owned will be added to gunSlots? And how do I influence this?

for (var gun : GameObject in guns)
		{
			if(gun.GetComponent(GunActivator).owned == true)
			gunSlots.Add(gun);
		}

Thanks

I’m not sure the order of for/in loops is actually defined. If you want a specific defined order, use a standard for loop with an index. (i.e., for (var i = 0; i < guns.Length; i++).)