I assume by the z of the scene you mean the Global Z-Axis. Just use transform.position to alter the global position. Example:
Vector3 vector = new Vector3(0, 0, 1);
transform.position += vector;
This adds 1 to the GameObject's Z-Axis every time it is run.
Edit: Do you mean in the Scene View? If so then follow these steps:
If you want to reverse it then just reset back to "Local"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.