instantiate an object from an int (the number of times it will be instantiated)

Hello, I’m looking for, as the title say to instantiate an object as many times as the int will tell, I explain if we put 10 in the int the object will instantiate 10 times

Thank you in advance !

Just a simple for loop should do the job…

    void SpawnGameObject(GameObject obj, Transform parent, int times)
    {
        for (int i = 0; i < times; i++)
        {
            Instantiate(obj, parent);
        }
    }

thanks for this clear answer is simple!