Це відео не доступне.
Перепрошуємо.

Unity AUDIO Tutorial - Make Sound Effects & Music

Поділитися
Вставка
  • Опубліковано 7 жов 2021
  • How to use audio in unity! all the basics and everything you need to start adding sounds and music to your game!

КОМЕНТАРІ • 15

  • @otaldojuca
    @otaldojuca Рік тому

    Great video, it helped me a lot.

  • @LumpyCustard521
    @LumpyCustard521 2 роки тому

    I love this channel and it always helps out a lot (:

    • @kapkoder4009
      @kapkoder4009  2 роки тому

      Appreciate the love

    • @LumpyCustard521
      @LumpyCustard521 2 роки тому

      @Kap Koder can you do a video on something 3D I am new to coding and I really love coding games. Keep up the great work!

    • @kapkoder4009
      @kapkoder4009  2 роки тому

      @@LumpyCustard521 like what?

    • @LumpyCustard521
      @LumpyCustard521 2 роки тому

      @Kap Koder maybe something like movement or just learning stuff like vectors and wall running love the content (:

    • @ialex9000
      @ialex9000 2 роки тому

      Yeah this channel is so helpful

  • @AnourMamoun
    @AnourMamoun Рік тому

    thanks

  • @ialex9000
    @ialex9000 2 роки тому

    Finally!

  • @CCLawhon
    @CCLawhon Рік тому

    1. TY for a great tutorial...however 2. Help! I am adding the "AudioManager. instance. EatSFX() ;" Like this, to my game object (Crystal) script, and I get the error below (mine is a crystal sound):
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.EventSystems;
    public class Crystal : MonoBehaviour
    {
    private void OnTriggerEnter(Collider other)
    {
    AudioManager.instance.CrystalSFX;
    PlayerInventory playerInventory = other.GetComponent();
    if (playerInventory != null)
    {
    playerInventory.CrystalCollected();
    gameObject.SetActive(false);
    }
    }
    }
    The error I get (no matter where I call AudioManager.instance) is: Assets/Scripts/Crystal.cs(15,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
    My AudioManager Script is:
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.Audio;
    public class AudioManager : MonoBehaviour
    {
    public static AudioManager instance;
    [SerializeField] AudioMixer mixer;
    [SerializeField] AudioSource crystalSource;
    [SerializeField] List crystalClips = new List();
    void Awake()
    {
    if (instance == null)
    {
    instance = this;
    DontDestroyOnLoad(gameObject);
    }
    else
    Destroy(gameObject);
    }
    public void CrystalSFX()
    {
    AudioClip clip = crystalClips[Random.Range(0, crystalClips.Count)];
    crystalSource.PlayOneShot(clip);
    }
    }
    I loaded the 3 sounds in the AudioManager fields (inspector) and have my crystal sound on the CrystalSource game object audio source.
    What am I missing??

  • @fplayfplay3161
    @fplayfplay3161 Рік тому

    Thank you for the turorial!
    Quick question though, you showed how to set the Mixer using the slider values. How do you reverse that though, setting the slider values using the values from the Mixer?
    I'm asking cause I've had the sound settings in a separate option menu but whenever i open the sound option it doesn't update the sliders accordingly to the Mixer.

    • @kapkoder4009
      @kapkoder4009  Рік тому

      Well we already have the mixers channels variables so you can set the sliders value to the mixers value

  • @juliaalder2007
    @juliaalder2007 2 роки тому +1

    I would love to learn more about Audio Mixers.

    • @kapkoder4009
      @kapkoder4009  2 роки тому +1

      That's an amazing idea! I'm going to make a video about it

    • @juliaalder2007
      @juliaalder2007 2 роки тому

      @@kapkoder4009 Thank you! ;)