“Suara persatuan” Kode Jawaban

Mainkan Sound Unity

AudioSource audioData;

    void Start()
    {
        audioData = GetComponent<AudioSource>();
        audioData.Play(0);
        Debug.Log("started");
    }
Stormy Sable

Suara persatuan

using System.Collections;
using UnityEngine;

public class AudioManager : MonoBehaviour
{
    [SerializeField]
    private AudioSource sampleAudioSource = null;

    void Awake(){
		if (sampleAudioSource == null)
            Debug.LogError("AUDIO_MANAGER: sampleAudioSource is NULL");
    }

    public void PlaySampleSound()
	{
    	sampleAudioSource.Play();
    }
}
ALeonidou

Jawaban yang mirip dengan “Suara persatuan”

Pertanyaan yang mirip dengan “Suara persatuan”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya