Last active
June 6, 2016 08:29
-
-
Save jplebre/4da4525d97bce79ee450b946a1fade4a to your computer and use it in GitHub Desktop.
How to have nested collections in Unity while picking them up in the inspector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class MaterialToSoundMapper : MonoBehaviour | |
| { | |
| public MAudio[] MaterialFootsteps; | |
| } | |
| [Serializable] | |
| public class MAudio | |
| { | |
| public Material material; | |
| public List<AudioClip> AudioClips; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Someone asked on twitter how to make a collection of footstep sounds per material, that can be editable in the Inspector
