Alex教程每一P的教程原代码加上我自己的理解初步理解写的注释,可供学习Alex教程的人参考
此代码仅为较上一P有所改变的代码
【Unity教程】从0编程制作类银河恶魔城游戏_哔哩哔哩_bilibili
UI_VolumeSlider.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.UI;
public class UI_VolumeSlider : MonoBehaviour
{
public Slider slider;
public string parametr;
[SerializeField] private AudioMixer audioMixer;
[SerializeField] private float multiplier;//这是给改音量的做乘积的
public void SliderValue(float _value)
{
audioMixer.SetFloat(parametr