You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
525 B
C#
24 lines
525 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
[ExecuteInEditMode]
|
|
public class ShowroomAudioplayer : MonoBehaviour
|
|
{
|
|
// public float fade
|
|
public AudioSource ShowroomAudio;
|
|
void OnEnable()
|
|
{
|
|
ShowroomAudio = GetComponent<AudioSource>();
|
|
float TrackLength = ShowroomAudio.clip.length;
|
|
float PlayStart = Random.Range(2, TrackLength);
|
|
ShowroomAudio.time = PlayStart;
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|