playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tropical

Pages: 1 [2]
16
Share New Actions / Set Mixer Float Value(s)
« on: September 23, 2015, 03:18:55 AM »
Hi all,

as I could not find an easy way to access exposed audio mixer parameters with playmaker, I have written an action to set the value of an exposed parameter using the SetFloat function of the unity audio mixer. Then I tried to rewrite it so one can set the values of more than one parameter.

The background: Unfortunately unity's audio mixer snapshot system does not work properly with time scale set to 0 (maybe it will in the future). So you cannot use it in a game pause.
- EDIT (11-10-2017): Ability to transition AudioMixer snapshots by scaled and unscaled time added in Unity 5.3.6 (see Release Notes Unity 5.3.6 and ScriptingAPI-AudioMixer.updateMode) -

Both actions work. Nevertheless... these are my first actions and I have no experience in writing code. So it would be great if someone (maybe Jean) could tell me if there are any "bad", unusual, or unnecessary elements in my actions - especially the second one: I am not sure about the compound array thing and about introducing private variables.

EDIT (09-26-2015): Now both actions are available on the Ecosystem.

See the code on github:

AudioMixerSetFloatValue

AudioMixerSetMultiFloatValues

in the category AudioMixer.

A few things worth mentioning: To use these actions you have to manually expose parameters in the mixer first. Their names in the action editor field have to be written correctly (you can create a string variable if you want). When you set the values of exposed mixer parameters using SetFloat / using these actions, those parameters cannot be controlled by the snapshot system unless you use the ClearFloat function. Watch the unity tutorial (audio mixer exposed parameters).

EDIT (11-10-2017): Another AudioMixer action on the Ecosystem:
AudioMixerGetFloatValue (see code on GitHub: AudioMixerGetFloatValue).

Thank you.
Bye

17
Share New Actions / Re: Transition Between 2 Snapshots (Unity 5 Audio Mixer)
« on: September 17, 2015, 03:57:21 PM »
Hi,

I wonder why the TransitionTime variable in this Action (Version: August 28) has the [UIHint(UIHint.Variable)]-thing? I don't know much about all that, but I think it forces you to input a variable as the value and doesn't let you just type a number. Sorry, if I'm wrong.

Bye,
Jay

Pages: 1 [2]