Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Transform.position

Switch to Manual
public Vector3 position;

Description

The position of the transform in world space.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { transform.position = new Vector3(0, 0, 0); print(transform.position.x); } }