Hi there,

I'm working on a new plugin for which I'd need to turn of the audio looping of a boombox.

A BoomBox has a property "AudioSource SoundSource;" but since "AudioSource" is contained in another DLL (UnityEngine.AudioModule) I can't access it from within my plugin. It throws the error:

Unable to load Test. The type name 'AudioSource' could not be found in the namespace 'UnityEngine'. This type has been forwarded to assembly 'UnityEngine.AudioModule, Version=*.*.*.*, Culture=neutral, PublicKeyToken=null' Consider adding a reference to that assembly.

No, adding "using UnityEngine.AudioModule;" to the top of my plugins CS-file does not work, since this gives me:

Error while compiling Test: The type or namespace name 'AudioModule' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?) |

I guess oxide does not load this library, correct?

How can I add this DLL to oxide so I can access it in my plugin?

 

Is the oxide patcher capable of doing it?
there I can add assemblies "to the project" but I don't know it this exposes it's namespaces, classes etc. to the plugin system.
I do not want to add a HOOK inside this dll, I just want to use the classes/types from this assembly.

 

Like

private void OnEntitySpawned(DeployableBoomBox boombox)
{
boombox.BoxController.AudioSource.Loop = false;
}

Thanks for your answers
Mac