SFX Manager Using Odin Inspector

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • Handling audio clips in a Unity Project can be a clicky tedious task. With Odin Inspector we can create a manager that handles all of the audio clips and a custom class that gives easy access to choosing an audio clip from the inspector.
    0:00 Intro
    0:47 SFX Clip
    2:12 Folder Structure
    2:33 SFX Manager
    5:23 SFX
    8:48 Scene Setup
    Tutorial Files: github.com/onewheelstudio/Dev...
    Odin Serializer: odininspector.com/odin-serial...
    Odin Tutorials: odininspector.com/tutorials
    Buy Odin Inspector: odininspector.com/pricing
    Buy Odin Project Validator: odininspector.com/odin-projec...
    Odin Inspector: odininspector.com/
    More Odin Tutorials: odininspector.com/tutorials
    Odin Attributes: odininspector.com/attributes
    Devdog Discord: / discord
    Assets Used in the Video (Affiliate Links)
    3D Free Modular Kit: assetstore.unity.com/packages...
    #devdog #odininspector #unitygamedevelopment #unitytool

Комментарии • 14

  • @autorotate1803
    @autorotate1803 3 года назад +7

    I really wish more people would use real-world examples with tutorials such as this. Thank you for creating this!

  • @SigmaZer0
    @SigmaZer0 4 года назад +11

    Greate video, it's these little systems that make game development, as a single developer, time-consuming. Odin Inspector is amazing and these videos sell it beautifully.

  • @erz3030
    @erz3030 2 года назад +1

    'One Wheel' should be hired to do the tutorial videos for all big Unity asset store assets lol. One of the best and most underrated Unity creators/teachers.

    • @OneWheelStudio
      @OneWheelStudio 2 года назад +1

      Easily my favorite comment! Ever. :)

  • @aldigangster123
    @aldigangster123 3 года назад +4

    Ironically this is the only serious tutorial for a scalable audio system I've found after researching this topic the last days. Thank you so much! Really appreciated.

  • @nemesis8508
    @nemesis8508 4 года назад +5

    You guys are awesome! Finally bit the bullet a few days ago. Odin has greatly increased my workflow and productivity. I feel like i can make my ridiculously large scope RPG as a solo dev.

  • @Pedro_Marangon
    @Pedro_Marangon 2 года назад +1

    That's one of the best audio handling tutorials I've seen. Only thing I would add is to change from one AudioClip to a List and when calling the single clip, picking a random clip from the list (adds more variation to the sound played and if you want only one clip, just needs to put one value on the list)

  • @tonybarbitta3622
    @tonybarbitta3622 4 года назад +4

    Great video as always Sirenix!
    Only criticism I would give is that you have too many null checks running for every "PlaySFX" call. You'd be better off doing the check once when the manager is first initialized to avoid doing 2 expensive unity null checks every time a single sound is played. Also maybe just have a collection of pooled audiosources that are just owned by the Manager itself, have the PlaySFX function give a sound clip as well as a position, then you can move the next available pooled audiosource to that position and play the sound. Just a thought ^_^

  • @flasheddierocks1
    @flasheddierocks1 2 года назад

    In Play FX Example if you change the Enum say from UI to Ambient the previous UI sound is still defaulted. I defaulted to the top of the new list when the sound type changes.... (tis more obvious if you change the name of the SFXClips created). Next to find a way to just add a new Enum and not have to hard code in SFXManager....then to get rid of the Enum with an SO list or something! Random sounds first though....

  • @Ziplock9000
    @Ziplock9000 3 года назад +1

    Odin aside, I'm not sure why you'd want to put the details about a sound on an SO rather than on the script that is on the GO that can inherit from PlayableSound class that has params for the sound. The only reason would be if you wanted to re-use the same sound setting values on multiple GOs of *different* types. But I can't think when that would happen?

    • @aldigangster123
      @aldigangster123 3 года назад

      actually that is a good reason imo. You have a Human, an Org, an Elf, for example. All chose the same SO with the same referenced AudioClip for footstep and it's specific settings for pitch and volume, as their footstep should all sound alike. If you instead inherit from a "PlayableSound" class you created, then you needed to change those settings for each prefab, even if they should sound 100% alike. This is the core idea of ScriptableObjects. To share data (= of any kind) between multiple objects.

    • @Ziplock9000
      @Ziplock9000 3 года назад

      ​@@aldigangster123 Sure that one example that works due to the fact that audio clips themselves don't have any settings.

  • @jadonmullinex9389
    @jadonmullinex9389 2 года назад +1

    You sound like the guy from One Wheel Studio. Is that you?

    • @OneWheelStudio
      @OneWheelStudio 2 года назад +1

      It is! Sorry I hadn't been doing a good job of monitoring comments on this channel.