|
Post by GameGuy on Aug 7, 2016 6:35:17 GMT
Hey great tool! I've had this for a while but not had the chance to implement it in any project until now and just starting to get the hang of it I was wondering if it's possible to preview my audio group that I've selected through the sound group attribute? For example something like this where I can select the desired audio group but on my inspector button I'm able to preview the clip in the inspector Thanks! using UnityEngine; using System.Collections; using DarkTonic.MasterAudio; #if UNITY_EDITOR using UnityEditor; #endif
public class AudioTest : MonoBehaviour {
[SoundGroupAttribute] public string soundGroup;
// Use this for initialization void Start() {
MasterAudio.PlaySound(soundGroup); }
}
#if UNITY_EDITOR [CustomEditor(typeof(AudioTest))] public class AudioTestEditor : Editor { override public void OnInspectorGUI() { AudioTest aT = (AudioTest)target;
DrawDefaultInspector();
if (GUILayout.Button("Preview")) { Debug.Log("Preview Audio Group");
} } } #endif
|
|
|
Post by DarkTonic Dev on Aug 8, 2016 19:47:21 GMT
If you're wanting that during runtime it would be pretty easy. But at edit time it's not.
Which are you looking for?
|
|
|
Post by GameGuy on Aug 8, 2016 19:59:08 GMT
I was looking to do it during edit through the inspector , just as a quicker way to preview sounds than go to the MA gameobject I tried to look but seems tough
|
|
|
Post by DarkTonic Dev on Aug 8, 2016 20:59:33 GMT
Indeed. I'll take a look after I finish the multiplayer stuff. Probably a couple weeks minimum. I'll put it on the roadmap.
|
|