Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Unity PlayOneShoot Audio

public class PlayAudio : MonoBehaviour
{
    public AudioSource audioSource;
    public AudioClip clip;
    public float volume=0.5f;

    void Start()
    {
        audioSource.PlayOneShot(clip, volume);
    }
}Copied!
Comment

PREVIOUS NEXT
Code Example
Csharp :: Convert any class to a keyvaluepair 
Csharp :: C# Payroll 
Csharp :: dotween do rotate on one axis 
Csharp :: hdrp lit change emmision values 
Csharp :: change color unity back and forth 
Csharp :: how can i only show just a part of alist in datagridview in c# 
Csharp :: c# please build the project and retry 
Csharp :: compass direction mobile unity 
Csharp :: how to make projectile track and go to specified enemy in unity 
Csharp :: advance C# tricks and hits 
Csharp :: wpf xaml group of buttons 
Csharp :: C# write to lines without extra line 
Csharp :: c# check if value in dictionary are unique 
Csharp :: how to detected WindowCloseEvent in other window wpf 
Csharp :: client = matrice[indexselectedclient] as String[]; 
Csharp :: model showing in scne view but not in game view 
Csharp :: unity control physics of multiple simulation 
Csharp :: is odd c# stackoverflow 
Csharp :: cache.TryGetValue in MemoryCache c# .net 
Csharp :: wetter warendorf 
Csharp :: how to set window position 
Csharp :: c# int array add number 
Csharp :: page refresh on button click in c# 
Csharp :: c# array backwards 
Csharp :: how to add default value to combobox in wpf 
Csharp :: how to check if a number is prime or not c# 
Csharp :: width="331" height="331" 
Csharp :: syoutube 
Html :: calling javascript file in html 
Html :: bootstrap select box arrow not visible 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =