# Resetting network objects with a button

You can add a button to your scene that will reset one or more network objects to predefined coordinates. For example, you can add a reset button to a cornhole game that returns all of the beanbags to their starting points.

For each network object, you create a game object that defines the desired reset transform. To trigger a reset, you call the `UpdateAllTransformValuesManualViaReference` method of the network object, and pass a reference to the game object that defines the reset transform.

The following diagram shows an example of how to arrange the components for a single network object in Unity, and the required references.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-e94ec05d6872a83685db7654d3705a909266b0bc%2Fnet_obj_reset_button.png?alt=media" alt=""><figcaption><p>Example use of a button to reset a network object's position</p></figcaption></figure>

You can use a single button to reset multiple network objects. Ensure that you create a game object to define the reset transform of each game object, and then add a reset call to each network object in the button's OnClick event list.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-2216681ea84be0929240b4556642e3c9580a9037%2Fmulti_button_reset_hierarchy.png?alt=media" alt=""><figcaption><p>Example hierarchy of network objects and game objects to define their reset transforms</p></figcaption></figure>

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-d1858296a18e5ab6a6b580a9c2680f26f1a5b597%2Fmulti_button_reset_onclick.png?alt=media" alt=""><figcaption><p>Calls to reset network objects</p></figcaption></figure>
