Activate Update Methode

Hello Community,

I have a little problem with my update methode… The methode dosent seems to work… even if I just want to Debug.Log (“XY”); Inside the methode is nothing else… do I have to activate the methode first?

show your code pls

Nope you don’t need to activate the Update method.
Be sure your method name is correctly writting and your script is attached to a game object in your scene. And your script need to inherits from MonoBehaviour

C# :

void Update() {
 
    }

Js:

function Update () {

    }
1 Like

A ton of thing have to happen first. In order from most common, here are some classic reasons Update won’t run.

  • update used instead of Update. Exact case matters.
  • Script not attached to a GameObject
  • Script not enabled
  • GameObject not active
  • Script does not inherit from MonoBehaviour
  • Script is not saved
  • Logic error inside Update means it is not executing target code
  • Compiler errors prevent entering play mode
  • Play button is not clicked
1 Like