how to make a copy of a gameobject in order to keep its transform.

Hello,
I would like to make a copy of a gameobject in order to be able to serve as a beacon to make it return to its place without passing by:
po = Vector3 (transform.position);
ro = Quaternium (transform.rotation);
of course the backup gameobject does not appear in the games.
It permeates me of restored its origin and all the initial parameters

Bonjour,
Je voudrais faire une copie d’un jeu d’objets afin de pouvoir servir de balise pour le faire revenir à sa place sans passer par:
po = Vector3 (transformation.position);
ro = Quaternium (transform.rotation);
bien sûr, l’objet de sauvegarde n’apparaît pas dans les jeux.
Il me permette de restaurer son origine et tous les paramètres initiaux

Well, there might be another way, but you can make an empty gameobject, name it marker or something, and then drag it into a prefab folder. Then just create a game object by using instantiate in a script and give it the position and rotation of the gameobject you want to copy.

If it’s not visible in the game, I don’t see a need to create a separate game object. Create a MonoBehaviour script for your game object and store the original transform on it. When you need to reset your game object, just restore the values from the copied transform.

the problem is that the copy of the gameobject
that I have at this moment is modified in transla and rotat like its original
while the only modifications are made only on one

thanks in advance

le problème est que la copie du gameobject
que j’ai en ce moment se modifie en transla et rotat comme son original
alors que les seules modif sont faites que sur un seul

merci par avance

If you give the gameobject a tag, then all the copies will have the same tag. Then use GameObject.FindGameObjectsWithTag(“”), which should return an array and you can loop though it and change all of them.