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,77 @@
|
|||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using static ABI.CCK.Scripts.Editor.SharedComponentGUI;
|
||||
|
||||
namespace ABI.CCK.Components
|
||||
{
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(CVRToggleStateTrigger))]
|
||||
public partial class CCK_CVRToggleStateTriggerEditor : Editor
|
||||
{
|
||||
#region EditorGUI Foldouts
|
||||
|
||||
private static bool _guiAreaConfigurationFoldout = true;
|
||||
private static bool _guiToggleTaskFoldout = true;
|
||||
|
||||
#endregion
|
||||
|
||||
private CVRToggleStateTrigger _trigger;
|
||||
|
||||
private SerializedProperty m_AreaSizeProp;
|
||||
private SerializedProperty m_AreaOffsetProp;
|
||||
|
||||
private SerializedProperty m_ToggleStateIDProp;
|
||||
|
||||
#region Unity Events
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (target == null) return;
|
||||
_trigger = (CVRToggleStateTrigger)target;
|
||||
|
||||
m_AreaSizeProp = serializedObject.FindProperty(nameof(CVRToggleStateTrigger.areaSize));
|
||||
m_AreaOffsetProp = serializedObject.FindProperty(nameof(CVRToggleStateTrigger.areaOffset));
|
||||
m_ToggleStateIDProp = serializedObject.FindProperty(nameof(CVRToggleStateTrigger.toggleStateID));
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_trigger == null)
|
||||
return;
|
||||
|
||||
serializedObject.Update();
|
||||
|
||||
Draw_AreaSettings();
|
||||
Draw_ToggleTask();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Drawing Methods
|
||||
|
||||
private void Draw_ToggleTask()
|
||||
{
|
||||
using (new FoldoutScope(ref _guiToggleTaskFoldout, "Toggle State Task"))
|
||||
{
|
||||
if (!_guiToggleTaskFoldout) return;
|
||||
using (new EditorGUI.IndentLevelScope())
|
||||
DrawToggleTask();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawToggleTask()
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
EditorGUILayout.PropertyField(m_ToggleStateIDProp, new GUIContent("Toggle State ID"));
|
||||
//Separator();
|
||||
EditorGUILayout.HelpBox("Sets the toggle state of your avatar when a CVRPointer enters the indicated trigger area.", MessageType.Info);
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d13d698c5f9399341a59c61852c2899c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,29 @@
|
|||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using static ABI.CCK.Scripts.Editor.SharedComponentGUI;
|
||||
|
||||
namespace ABI.CCK.Components
|
||||
{
|
||||
public partial class CCK_CVRToggleStateTriggerEditor
|
||||
{
|
||||
private void Draw_AreaSettings()
|
||||
{
|
||||
using (new FoldoutScope(ref _guiAreaConfigurationFoldout, "Area Configuration"))
|
||||
{
|
||||
if (!_guiAreaConfigurationFoldout) return;
|
||||
using (new EditorGUI.IndentLevelScope())
|
||||
DrawAreaSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawAreaSettings()
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
EditorGUILayout.PropertyField(m_AreaSizeProp, new GUIContent("Area Size"));
|
||||
EditorGUILayout.PropertyField(m_AreaOffsetProp, new GUIContent("Area Offset"));
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b08533f49b5984f43b0672b871b5a23e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue