123456789101112131415161718192021222324252627282930 |
- using TFramework;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEditor;
- namespace TFramework
- {
- [CustomEditor(typeof(AudioManager))]
- public class AudioManagerInspector : TEditor
- {
- private SerializedProperty _backgroundSource;
- private SerializedProperty _otherSource;
- private void OnEnable()
- {
- _backgroundSource = serializedObject.FindProperty("_backgroundSource");
- _otherSource = serializedObject.FindProperty("_otherSource");
- }
- public override void OnInspectorGUI()
- {
- serializedObject.Update();
- EditorGUILayout.PropertyField(_backgroundSource, new GUIContent("背景音频播放器"));
- EditorGUILayout.PropertyField(_otherSource, new GUIContent("其他音频播放器"));
- serializedObject.ApplyModifiedProperties();
- }
- }
- }
|