playMaker

Author Topic: Wwise - Unity - Playmaker  (Read 6783 times)

sdog

  • Playmaker Newbie
  • *
  • Posts: 2
Wwise - Unity - Playmaker
« on: January 22, 2015, 08:45:31 PM »
Hi Guys,

I have a small question. Iam a Sounddesigenr and Composer for Films and start now to go also into Gamesound. I work with wwise and i love it. Now i work on a project where the gamesdesigner workes with Unity and Playmaker. Iam a totally noob in playmaker and have no idea how it workes. The GD dont know wwise and like i saw u can only trigger Audioclips in Playmaker. Is it possible to trigger also Wwise Events?

THanx a lot!

ViRiX Dreamcore

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Wwise - Unity - Playmaker
« Reply #1 on: January 23, 2015, 03:58:42 AM »
I'm afraid you'd have to write a special event for that.

I and a few others have been asking for Wwise and/or FMOD Studio support for a while. If someone writes it and posts it on the asset store even, this would be great.

There are however some other audio tools in the Asset Store that do work such as Master Audio which I've used for some dynamic music. Yeah it's not perfect, but it does give you a lot of flexibility.

Hopefully this will come in the future.

sdog

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Wwise - Unity - Playmaker
« Reply #2 on: January 23, 2015, 03:08:02 PM »
Okey, iam the last one who knows how to write a code :D but is this so difficult, that nobody has done it till now? There are allready a lot of scripts. I think all u need is to have the 4 Importent items: PlayEvent, Ambient, Switch and State.
Here a code i find in the Net. Maybe we can together find a solution or a overall special event:


Code: [Select]
{

uint bankID;
// Use this for initialization
protected void LoadBank () {

AkSoundEngine.LoadBank ("HEREBANKNAME", AkSoundEngine.AK_DEFAULT_POOL_ID, out bankID);
}

// Update is called once per frame
void Update () {

}

public void PlayEvent (string eventName)
{
AkSoundEngine.PostEvent (eventName, gameObject);
}

public void StopEvent (string eventName, int fadeout)
{
uint eventID;
eventID = AkSoundEngine.GetIDFromString (eventName);
AkSoundEngine.ExecuteActionOnEvent (eventID, AkActionOnEventType.AkActionOnEventType_Stop, gameObject, fadeout * 1000, AkCurveInterpolation.AkCurveInterpolation_Sine);
}

public void PauseEvent (string eventName, int fadeout)
{
uint eventID;
eventID = AkSoundEngine.GetIDFromString (eventName);
AkSoundEngine.ExecuteActionOnEvent (eventID, AkActionOnEventType.AkActionOnEventType_Pause, gameObject, fadeout * 1000, AkCurveInterpolation.AkCurveInterpolation_Sine);
}

public void ResumeEvent (string eventName, int fadeout)
{
uint eventID;
eventID = AkSoundEngine.GetIDFromString (eventName);
AkSoundEngine.ExecuteActionOnEvent (eventID, AkActionOnEventType.AkActionOnEventType_Resume, gameObject, fadeout * 1000, AkCurveInterpolation.AkCurveInterpolation_Sine);
}

}

the Playmaker code for Audio is

Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Audio)]
[Tooltip("Plays the Audio Clip set with Set Audio Clip or in the Audio Source inspector on a Game Object. Optionally plays a one shot Audio Clip.")]
public class AudioPlay : FsmStateAction
{
[RequiredField]
[CheckForComponent(typeof(AudioSource))]
[Tooltip("The GameObject with an AudioSource component.")]
public FsmOwnerDefault gameObject;

[HasFloatSlider(0,1)]
        [Tooltip("Set the volume.")]
public FsmFloat volume;

[ObjectType(typeof(AudioClip))]
[Tooltip("Optionally play a 'one shot' AudioClip. NOTE: Volume cannot be adjusted while playing a 'one shot' AudioClip.")]
public FsmObject oneShotClip;

[Tooltip("Event to send when the AudioClip finishes playing.")]
public FsmEvent finishedEvent;

private AudioSource audio;

public override void Reset()
{
gameObject = null;
volume = 1f;
oneShotClip = null;
    finishedEvent = null;
}

public override void OnEnter()
{
var go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go != null)
{
// cache the AudioSource component

audio = go.audio;
if (audio != null)
{
var audioClip = oneShotClip.Value as AudioClip;

if (audioClip == null)
{
audio.Play();

if (!volume.IsNone)
{
audio.volume = volume.Value;
}

return;
}

if (!volume.IsNone)
{
audio.PlayOneShot(audioClip, volume.Value);
}
else
{
audio.PlayOneShot(audioClip);
}

return;
}
}

// Finish if failed to play sound

Finish();
}

public override void OnUpdate ()
{
if (audio == null)
{
Finish();
}
else
{
if (!audio.isPlaying)
{
Fsm.Event(finishedEvent);
Finish();
}
                else if (!volume.IsNone && volume.Value != audio.volume)
{
audio.volume = volume.Value;
}
}
}
}
}

how to modify it, that u can use ur audio events, switches aso in playmaker?
« Last Edit: January 23, 2015, 05:32:01 PM by sdog »

tttlllrrr

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Wwise - Unity - Playmaker
« Reply #3 on: June 16, 2016, 09:22:44 PM »
Seems like this guy has been making headway with this:


Wwise PlayMaker Action:
http://pastebin.com/CSVnbsUq

Jono not Bono

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Wwise - Unity - Playmaker
« Reply #4 on: October 16, 2022, 10:26:58 PM »
Hi Guys,

I have a small question. Iam a Sounddesigenr and Composer for Films and start now to go also into Gamesound. I work with wwise and i love it. Now i work on a project where the gamesdesigner workes with Unity and Playmaker. Iam a totally noob in playmaker and have no idea how it workes. The GD dont know wwise and like i saw u can only trigger Audioclips in Playmaker. Is it possible to trigger also Wwise Events?

THanx a lot!

Did you make any headway with this? I dream of using Wwise and Playmaker but not a coder. Very curious to see if anyone has created some actions to use with Wwise and Playmaker.

Wwise is just such an incredible tool. I was using FMOD but I prefer Wwise so much more!

Jono

MarkD

  • Full Member
  • ***
  • Posts: 113
Re: Wwise - Unity - Playmaker
« Reply #5 on: November 12, 2023, 11:08:24 AM »
I recently wrote a few actions for my Wwise intergration into Unity for use with Playmaker. 

I'm not a programmer, so I wonder if there is anyone here with a high level of coding experience who could check my code to make sure it's optimized and performant?

And of course after that, I'll definitely be willing to share what I've got.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Wwise - Unity - Playmaker
« Reply #6 on: November 12, 2023, 11:29:28 AM »
Hi.
I would suggest you to join discord, there are many there that can program a bit and can help verify :)

Blostime

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Wwise - Unity - Playmaker
« Reply #7 on: December 21, 2023, 04:24:44 AM »
I think you can integrate Wwise with Unity and Playmaker using Wwise Unity Integration. That should make it easier, theoretically. Also, there are various online courses available, and I, for example, am currently taking literature courses using different online services, described in the article https://emilyandblair.com/post-graduation-employment/ that can be excellent aids, such as argumentative essay examples by StudyMoose or any others. There is now broad access to diverse online materials and courses, significantly facilitating work in many fields. These courses can be short and not time-consuming, so take a look; perhaps there is something related to your topic.
« Last Edit: December 26, 2023, 12:07:23 PM by Blostime »