-
-
Save todorok1/49cbc65796d232873b5f61ba461337e4 to your computer and use it in GitHub Desktop.
transform.positionを取得して値を変えたらセットし直す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// transform.positionを取得してみる | |
Vector3 pos = gameObject.transform.position; | |
// 値を変えてみる | |
pos.x += 5.0f; | |
// transform.positionにセットし直す | |
gameObject.transform.position = pos; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment