C# 2D, Changing a float on a Prefab in during while running.

I want to Change a float number on an Object before it gets Instantiated and I dont know how thats Possible so thats why i am here,

I am making the Chrome offline trex game and am moving the ground, So i want to increase the speed over time, but the newly Instantiated Ground Objects still have the base speed, so my question is how i can change that.

Thanks in Advance for Help^^

You can change the value on the same frame the object is instantiated.

GameObject foo = Instantiate(whatever);
foo.floatValue = 10f;
2 Likes