edited January 21 in ORK Support
Hey guys,

this seems to be a huge issue for me. Got a FX channel set up in Unity's Audio Mixer. But can't seem to find on how to set all ORK Sounds to it.
All sounds spawned by it are by default set to none. So how do I change the ORK's Sound Channel so they can be added to a preferred mixer?
Or maybe at least in Makinom?

Reason I'm going for custom mixer solution is that sounds in Main Menu are not applied to New Game which looks lame.
Post edited by Machal on
  • In ORK you'll have to do that by script:
    ORK.Audio.GetSoundChannel(index).Source.outputAudioMixerGroup = mixerGroup;
    E.g. just do that in the first scene where you initialize ORK.

    Makinom (1) doen't include sound channels. Makinom 2 does, and you can directly set up mixer groups in the game settings for them :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 22
    Hmm, I have no idea where to put it, as in a plain script it's giving me errors (I'm not a coder) sorry ... trying to understand.

    The default ORK sound channel index is 0, right? So how do I put that in a script. I think I should define the mixer group? My mixer is "Mixer_Main" and the sound group FX child, so "Master/FX".

    A plain row in that code doesn't seem to recognize GetSoundChannel command.
    Post edited by Machal on
  • You can use this component:


    using UnityEngine;
    using UnityEngine.Audio;
    using ORKFramework;

    public class SetORKSoundChannel : MonoBehaviour
    {
    public int channelIndex = 0;

    public AudioMixerGroup group;

    protected virtual void Start()
    {
    ORK.Audio.GetSoundChannel(this.channelIndex).Source.outputAudioMixerGroup = this.group;
    }
    }


    Just select the channel index and audio mixer group and it'll do the rest for you :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 24
    God bless you and your work man! Big thanks!

    EDIT: Though I'm still getting this error after saving the script:

    SetORKSoundChannel.cs(13,13): error CS1061: Type `UnityEngine.AudioSource' does not contain a definition for `GetSoundChannel' and no extension method `GetSoundChannel' of type `UnityEngine.AudioSource' could be found. Are you missing an assembly reference?

    I'm on Unity 2017.4.27 and ORK 2.30.2 if that helps.
    Post edited by Machal on
  • Ah, sorry, forget that sound channels are coming in the next update :D
    So, in ORK 2.30.2 or earlier are no sound channels you can use.

    Also, if you play audio on game objects (e.g. via the Play Sound node), they're playing using Audio Source components on those game objects, i.e. you can simply set up the mixer group on them.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 25
    Thanks, that really helped.

    One minor thing, I have few sounds set up in Menus->Menu Settings->Default Audio Settings also few Notifications across ORK. These sounds ignore my Audio Mixer settings.

    It's in the 'DontDestroyOnLoad/_ORK' Audio Source...how do I change it there too? :)
    Post edited by Machal on
  • That'll be possible via the sound channels in the next update.
    Currently you'll have to find the _ORK game object and get the audio source from it. You can find game objects like this:

    GameObject gameObject = GameObject.Find("_ORK");
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 26
    Oh god no coding from me again :D

    I was able to set the output via Makinom, thanks for defining the object :)
    Post edited by Machal on
Sign In or Register to comment.