Version: 2023.2
언어: 한국어
public Audio.AudioResource resource ;

설명

The default AudioResource to play.

You can also use this property to set the AudioResource that plays next.

using UnityEngine;

[RequireComponent(typeof(AudioSource))] public class ExampleClass : MonoBehaviour { public AudioResource m_Resource;

public void PlayAudioResource() { AudioSource audioSource = GetComponent<AudioSource>(); audioSource.resource = m_Resource; audioSource.Play(); } }