make simple FX sound Manager in Unity
easy way to make sound Manager to apply FX in your Game in Unity Engine
1 .What is the sound effect "FX" in the game.
Sound effects in video games are an important and indispensable element. Just as sound effects are included in movies and animations to enhance the scene and make it more protective and also from an aesthetic point of view. So it is necessary to add sound effects to the game.Ex for sound Effect ( Explosion, Shooting, Rain, Jump, Wallk, Hurt....)
2 . How to create a Sound Manager in Unity :
- In the first go to "Assets" folder and create a new folder and name it "Resources"
- in this new Folder you will add all your sound effect files
- add Specific name to each sound because you will use her name in Th C# script for The Sound Manager
- Now create a Prefabs Name it "SoundManager" , Clickin" add a component" and select Audio source, enable Loop.
- create anew Script ,name it "SoundManager" and add it to SoundManager prefabs.
- Open The Script and add the Following Code C#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SoundManager : MonoBehaviour
{
public static AudioClip fireSound, jumpSound, exempleSound;
static AudioSource audioSrc;
// Start is called before the first frame update
void Start()
{
fireSound = Resources.Load<AudioClip>("fire sound name");
jumpSound = Resources.Load<AudioClip>("maro-jump");
exempleSound = Resources.Load<AudioClip>("your sound name");
audoSrc = GetComponent<AudioSource>();
}
// Update is called once per frame
void Update()
{
}
public static void PlaySound(string clip)
{
switch (clip)
{
case "fire sound name":
audioSrc.PlayOneShot(fireSound);
break;
case "jump sound name":
audioSrc.PlayOneShot(jumpSound);
break;
case "your sound name":
audioSrc.PlayOneShot(exempleSound);
break;
}
}
}
- Change < your sound name > by the name of your mp3 sound
- Change < exempleSound > by what you lake for name.
..
Download Best Sound Effect for your game:
Free Sound Effects Pack
This is a selection of a variety of free sounds You will find: guns, explosions, outdoor atmospheres, medieval, fantasy, monsters, ghosts, natural disasters and so on !
Download link: Free Sound Effects Pack
Premium Gun Sounds Pack
- 1,523 Uncompressed Sounds
- Digitally Mastered 5.1 Surround Sound
- Developed from 96,000 kHz
Download link:Premium Gun Sounds Pack
Weapon Soldier Sounds Pack
This package contains realistic weapon and soldier sounds.
Sound Types:
-4x bullet shells
-fire
-fall
-jump
-kick
-reload
Download link: Weapon Soldier Sounds Pack
Game Voice Ultimate Pack
Game Voice Ultimate Pack is high quality and powerful voice collection for games and movie production.
With the presence or absence of a voice,images of games and movies change greatly.
Download link: Game Voice Ultimate Pack
Fantasy SFX for Particle Distort Texture Effect Library
Download link: Fantasy SFX for Particle Distort Texture Effect Library
Interface and Item Sounds
Includes interface sound for menus:
→ Clicks and Buttons
→ Futuristic UI
→ Menu and Pops
→ Switches and Special SFX
Post a Comment
image video quote pre code