How to make the scrollSpeed up

Hi!

In the following script, I changed the integer -1.5f into +1.5f to make the background speed up.
But its speed is the same as before, I mean, not changed.

public float scrollSpeed = -1.5f

How to make the speed of the background faster?
Your help will be very appreciated.

Sincerely,

If that line is in a script that is dragged into any Prefab or Scene, Unity has saved the value and is overwriting what you put in code.

Go find the script in your scene or prefab and change it there. The above value is only used at the instant in time you construct the object, ie., drag the script onto a GameObject.

Hi! Kurt-Dekker,

I have solved this issue thanks to your instruction.
I took the following path.

Scenes(in Project View) → Main(in Hierarchy View) → GameController → Scroll Speed (in Inspector View).

Thank you again!

Merry X-mas and Happy New Year.

1 Like