# Calling and changing the same instance with different scripts (Unity)

**URL:** <https://qa.fmod.com/t/calling-and-changing-the-same-instance-with-different-scripts-unity/15346>\
**Category:** FMOD Engine\
**Created:** [December 28, 2019, 2:54pm UTC](https://qa.fmod.com/t/calling-and-changing-the-same-instance-with-different-scripts-unity/15346 "2019-12-28T14:54:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yotam](https://avatars.discourse-cdn.com/v4/letter/y/c0e974/32.png) [@yotam](https://qa.fmod.com/u/yotam)\
**Post date:** [December 28, 2019, 2:54pm UTC](https://qa.fmod.com/t/calling-and-changing-the-same-instance-with-different-scripts-unity/15346/1 "2019-12-28T14:54:03Z")

</div>

Hi All

Is it possible to control an instance with one script that was created with a different script?  
For example, I want to pause music that was created when the FPS controller started, by pausing from my game manager script for a pause menu.

---

<div class="post-metadata">

**Author:** ![alexzzen](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexzzen/32/6825_2.png) [@alexzzen](https://qa.fmod.com/u/alexzzen)\
**Post date:** [December 28, 2019, 4:26pm UTC](https://qa.fmod.com/t/calling-and-changing-the-same-instance-with-different-scripts-unity/15346/2 "2019-12-28T16:26:44Z")

</div>

This is common question when using Unity. Declare your FPS controller script in your Game Manager script at the start of the class like this:

```
[SerializeField]
private FPSControllerScript fpsController;

```

Replace FPSControllerScript with the right name of your FPS controller script. Save the script and drag your GameObject containing the FPS controller into the new empty field appearing in the Game Manager component.

After that you can easily access the EventInstance in your Game Manager by calling this code for example:

```
    fpsController.EventInstance.setPaused(true);

```

Replace EventInstance with your instance’s name and make sure the instance is set to public in the FPS controller script.
