Why is Start() behave like Update()

Just about to do some testing with RigidBody2D and started by adding below code. What it does is that it loops, as Update(), and add an infinitive number of the GameObject. Can someone please explain why as i thought it should only execute this code once?

If I only have a print it execute only once but with the GameObject it loops.

using UnityEngine;
using System.Collections;

public class myScript : MonoBehaviour {

    void Start() {

        GameObject myGameObject = Resources.Load ("Ruby") as GameObject;
        Instantiate (myGameObject);

    }

}

It should run only once, unless it instantiates itself, I guess.
Does this “Ruby” have this script in it?

Oh my god, for some reason i had added the script to the Ruby as you stated as well as to the empty GameObject i use to execute. I didn’t even consider that. What a stupid mistake, I should have checked that. Thanks!

1 Like

Sure, glad to have helped.