update CCK to 3.10, fixing unity 2021 crash :)
This commit is contained in:
parent
48a978fa2a
commit
d11e0fb3a9
492 changed files with 2165204 additions and 437687 deletions
|
@ -0,0 +1,63 @@
|
|||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
|
||||
// I likely overcomplicated this GUI. I'm not sure if I'll keep it this way or not.
|
||||
|
||||
namespace ABI.CCK.Components
|
||||
{
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(CVRAudioDriver))]
|
||||
public partial class CCK_CVRAudioDriverEditor : Editor
|
||||
{
|
||||
#region EditorGUI Foldouts
|
||||
|
||||
private static bool _guiAudioSettingsPlaybackFoldout;
|
||||
private static bool _guiAudioSettingsAudioSourceFoldout;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Variables
|
||||
|
||||
private CVRAudioDriver _audio;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialized Properties
|
||||
|
||||
private SerializedProperty m_AudioSourceProp;
|
||||
private SerializedProperty m_AudioClipsProp;
|
||||
|
||||
private SerializedProperty m_SelectedAudioClipProp;
|
||||
private SerializedProperty m_PlayOnSwitchProp;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Events
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (target == null) return;
|
||||
_audio = (CVRAudioDriver)target;
|
||||
|
||||
m_AudioSourceProp = serializedObject.FindProperty(nameof(CVRAudioDriver.audioSource));
|
||||
m_AudioClipsProp = serializedObject.FindProperty(nameof(CVRAudioDriver.audioClips));
|
||||
m_SelectedAudioClipProp = serializedObject.FindProperty(nameof(CVRAudioDriver.selectedAudioClip));
|
||||
m_PlayOnSwitchProp = serializedObject.FindProperty(nameof(CVRAudioDriver.playOnSwitch));
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_audio == null)
|
||||
return;
|
||||
|
||||
serializedObject.Update();
|
||||
|
||||
Draw_DriverSettings();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: adf3d613d523bbd499c6f4ba881065b8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,54 @@
|
|||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using static ABI.CCK.Scripts.Editor.SharedComponentGUI;
|
||||
|
||||
namespace ABI.CCK.Components
|
||||
{
|
||||
public partial class CCK_CVRAudioDriverEditor
|
||||
{
|
||||
private void Draw_DriverSettings()
|
||||
{
|
||||
using (new LabelScope("Driver Settings"))
|
||||
{
|
||||
using (new EditorGUI.IndentLevelScope())
|
||||
DrawDriverSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawDriverSettings()
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
DrawPlaybackSettings();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
DrawAudioSources();
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
#region Drawing Methods
|
||||
|
||||
private void DrawPlaybackSettings()
|
||||
{
|
||||
if (!InnerFoldout(ref _guiAudioSettingsPlaybackFoldout, "Playback"))
|
||||
return;
|
||||
|
||||
EditorGUILayout.PropertyField(m_PlayOnSwitchProp, new GUIContent("Play On Switch"));
|
||||
EditorGUILayout.PropertyField(m_SelectedAudioClipProp, new GUIContent("Selected Audio Clip"));
|
||||
}
|
||||
|
||||
private void DrawAudioSources()
|
||||
{
|
||||
if (!InnerFoldout(ref _guiAudioSettingsAudioSourceFoldout, "Audio"))
|
||||
return;
|
||||
|
||||
EditorGUILayout.PropertyField(m_AudioSourceProp, new GUIContent("Audio Source"));
|
||||
EditorGUILayout.PropertyField(m_AudioClipsProp, new GUIContent("Audio Clips"), true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 360cc45fe4eb1404889e3a462ed515f3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue