playMaker

Author Topic: Converting string to object type : Audio Clip name.  (Read 2423 times)

picsel100

  • Playmaker Newbie
  • *
  • Posts: 7
Converting string to object type : Audio Clip name.
« on: March 05, 2014, 05:55:39 AM »
I’m making many short scenes using Unity and Play Maker.
Each of the scene has audio clips and I was making these scenes
by dragging audio clips to Audio Play one by one.

and I was wandering if I could do this automatically by using set String Value.

Let’s say I have “Sound001.mp3” file. and I put this name in String Value in “Set String Value”
and I want to bring this name to Audio Play that can show the Audio name in like “One Shot Clip : Sound001.mp3”
(see picture 01)

but the thing is that String value doesn’t convert to “Object Type: UnityEngine. Audio Clip”
(see picture02)


do you have anything like “Convert String to Object(or Object name)?”
because you have “Convert Material To Object” and “Convert String To Int”

Or is there anything I can do to make this work automatically?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Converting string to object type : Audio Clip name.
« Reply #1 on: March 05, 2014, 08:35:06 AM »
Using a solution like Master Audio or Sound Manager Pro will make this immensely simpler and both have Playmaker actions. If you want this audio stuff to scale with the game then you're going to want it to be a simple process, rather than this string conversion stuff going on here.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D