Well, this problem confused me for two days but I still cannot solve it.
Figure 1. Assign the variable
Figure 2. Code in script

Figure 3. Running in the Play Mode
Figure 4. Running the exe on Windows
The first image shows that I’ve dragged the GameObject “Road1” “Road2” into the slot;
And the second image shows the content of the script, what I wanna do is that when the player(the sphere) trigger the EntranceCollider object (a sub object of Road), the specific GameObject “Road1”(or “Road2”) would translate a vector3-offset assigned in the Inspector View.
It works well in the Game View when I Play the game in the Unity Editor, as shown in the third image.
But it doesn’t work when I build it to an windows exe file, you can find the screen printing the text “fucking null” in the top left of the image, (sorry for using this word).
Well, my apologize for my pool English cuz I’m poor in English. I doubt whether it’s a bug of Unity or just some mistake I made.