how to move obhect in c# unity code example
Example 1: how to move an object in unity using c#
using UnityEngine; using System.Collections; public class NewBehaviourScript: MonoBehaviour { void Start (){ Transform.Position.X = 2; Debug.Log("Test"); } }
Example 2: how to move an object in unity using c#
public class NewBehaviourScript: MonoBehaviour { public float movementSpeed = 10; void Update(){ transform.Translate(Vector3.right * movementSpeed * Time.deltaTime); } }