Version: 2023.2
言語: 日本語
public AudioClip clip ;

説明

再生するデフォルトの AudioClip

AudioSource clip determines the audio clip that will be played next. Assigning clip with a new audio clip does not instantly change the clip that is being played. In the example below clip is assigned as the next AudioClip before it is played.

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(AudioSource))] public class ExampleClass : MonoBehaviour { public AudioClip otherClip;

IEnumerator Start() { AudioSource audio = GetComponent<AudioSource>();

audio.Play(); yield return new WaitForSeconds(audio.clip.length); audio.clip = otherClip; audio.Play(); } }