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.


Topics - tropical

Pages: [1]
1
Playmaker Help / Specify Type of FsmArray in Custom Action [SOLVED]
« on: February 17, 2016, 04:54:17 AM »
Hi,

I try to use an FsmArray variable (Playmaker 1.8+) containing Ints in a custom action. How can I specify the type?
If I use [ArrayEditorAttribute(typeof(int))] or [ArrayEditorAttribute(typeof(FsmInt))] the action does not accept array variables of type 'Int' but only of type 'Object -> Int32' or 'Object -> FsmInt'.
Maybe the solution is too simple and I just don't see it...?
Can anyone help?

Thanks.

2
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

Pages: [1]