# Can we get FMOD plugin version defines to use with preprocessor directives?

**URL:** <https://qa.fmod.com/t/can-we-get-fmod-plugin-version-defines-to-use-with-preprocessor-directives/20959>\
**Category:** Unity\
**Created:** [December 5, 2023, 6:09pm UTC](https://qa.fmod.com/t/can-we-get-fmod-plugin-version-defines-to-use-with-preprocessor-directives/20959 "2023-12-05T18:09:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gtzpower1](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@gtzpower1](https://qa.fmod.com/u/gtzpower1)\
**Post date:** [December 5, 2023, 6:09pm UTC](https://qa.fmod.com/t/can-we-get-fmod-plugin-version-defines-to-use-with-preprocessor-directives/20959/1 "2023-12-05T18:09:32Z")

</div>

We are updating some shared audio code that is used across many projects which use FMOD. As FMOD changes and things like StudioEventEmitter.Event get replaced with StudioEventEmitter.EventReference, I would like to be able to use preprocessor directives to compile different code paths based on the version of the FMOD plugin that our projects are using. For example:

```auto
#if FMOD_PLUGIN_2_02_OR_NEWER
    audioEvent = FMODUnity.RuntimeManager.CreateInstance(eventEmitter.EventReference);
#else
    audioEvent = FMODUnity.RuntimeManager.CreateInstance(eventEmitter.Event);
#endif

```

This would be great!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [December 7, 2023, 4:06am UTC](https://qa.fmod.com/t/can-we-get-fmod-plugin-version-defines-to-use-with-preprocessor-directives/20959/2 "2023-12-07T04:06:51Z")

</div>

That sounds really useful, I’m just not sure how we’d surface the defines in your code from our plugin. I’ll create an internal task to investigate if there is a way to do it.
