UnityNinja Community
close
Would you like to react to this message? Create an account in a few clicks or log in to continue.
menu
UnityNinja Community
Log in
search
apps
comment
UnityNinja Community
UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.
Playing Audio script?
power_settings_new
Login to reply
2 posters
home
UnityNinja Community
::
HELP
::
Help (General)
description
Playing Audio script?
Sun Jun 08, 2014 8:18 am
more_horiz
Help me guys i need a script that replays a .mwv or mp3 audio file but waits a few seconds before the replay. Does any body knows how to make that possible?
description
Re: Playing Audio script?
Wed Aug 13, 2014 2:07 pm
more_horiz
Try the following C# code:
using UnityEngine;
using System.Collections;
public class Audio : MonoBehaviour {
// Use this for initialization
void Start () {
StartCoroutine (PlayAudio ());
}
IEnumerator PlayAudio(){
while(true){
yield return new WaitForSeconds (3f);
audio.Play ();
}
}
}
add_circle
Similar topics
remove_circle
Similar topics
chat_bubble
Audio in trigger
chat_bubble
Help WITH THIS SCRIPT
chat_bubble
how to clear audio listeners
chat_bubble
help with AI script
chat_bubble
Gun.js script giving errors and letting me to attach the script
Jump to:
Select a forum
|
|--Welcome!
| |--Introduce Yourself!
|
|--General Dicussions
| |--Request
|
|--Resources
| |--3D Models & Animations
| |--Scripts
| |--Complete Projects
| |--Other Recourses
|
|--HELP
| |--Help (General)
|
|--Tutorials
|--Project Showcase
|--Seeking Team Members
privacy_tip
Permissions in this forum:
You
cannot
reply to topics in this forum
power_settings_new
Login to reply