playMaker

Author Topic: Is global variable good for this?  (Read 598 times)

Silicon Power

  • Full Member
  • ***
  • Posts: 186
Is global variable good for this?
« on: April 29, 2021, 02:08:46 PM »
Hi, I need to build a huge database of audio files for my game to load those audio in my game during runtime, What is the best way to do this? Is global variable good for this pourpose or I can use regular array and variables?

Weak Interactive

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 33
Re: Is global variable good for this?
« Reply #1 on: April 29, 2021, 03:55:35 PM »
I would not recommend using Global Variables for large scale data storage, I've personally had problems in the past with just 20-30 Global Variables and I don't use them at all anymore.

I personally use a third party asset called "Master Audio: AAA Sound" for all of my audio, and it's great. I don't load the audio at runtime, I just have it in the scene by default, but I'm pretty sure you can do that with this asset too. It also comes with around 50 Playmaker actions which cover pretty much all of its features.

It's on sale for half off on the Unity Asset Store right now: https://assetstore.unity.com/packages/tools/audio/master-audio-aaa-sound-5607

You can check out their documentation to see if they have what you need: http://www.dtdevtools.com/docs/masteraudio/TOC.htm

It has a bit of a learning curve, but I was able to learn how to do everything I needed in a day or two.

Just thought I'd mention this asset since I've had good results with it. Good luck!