last frame using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Update(){ float translation = Time.deltaTime * 10; transform.Translate(0, 0, translation); } }
using UnityEngine; using System.Collections; public GameObject player; public class ExampleClass : MonoBehaviour { void Example(){ player = GameObject.Find(‘Player’); } }