We have ruled out that it’s not Plastic.
*** EDIT ***
Hey, I’m suddenly having problems when using the Editor function EditorGUILayout.BeginHorizontal() and I’m tracing it to PlasticSCM somehow.
I’m using Unity 2019.4.35f1 with the Version Control package updated to 1.14.15
If I run the code below it works fine.
But if I un-comment lines 15 and 25 then something breaks.
for (int i = 0; i < m_TrackChannels.arraySize; i++)
{
var _audioClip = m_TrackChannels.GetArrayElementAtIndex(i).FindPropertyRelative("m_AudioClip");
if (_audioClip.objectReferenceValue == null)
{
m_TrackChannels.DeleteArrayElementAtIndex(i);
break;
}
switch (m_Mode)
{
case Mode.EditChannels:
{
//EditorGUILayout.BeginHorizontal();
{
if (GUILayout.Button("X", GUILayout.Width(20f)))
{
m_TrackChannels.DeleteArrayElementAtIndex(i--);
serializedObject.ApplyModifiedProperties();
return;
}
EditorGUILayout.PropertyField(_audioClip, GUIContent.none, true, GUILayout.ExpandWidth(true));
}
//EditorGUILayout.EndHorizontal();
GUILayout.Space(10f);
}
break;
case Mode.ModifyMusic:
{
EditorGUILayout.BeginHorizontal();
{
var _enabled = m_TrackChannels.GetArrayElementAtIndex(i).FindPropertyRelative("m_Enabled");
EditorGUILayout.PropertyField(_enabled, GUIContent.none, true, GUILayout.Width(20f));
EditorGUILayout.PropertyField(_audioClip, GUIContent.none, true, GUILayout.ExpandWidth(true));
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.BeginHorizontal();
{
EditorGUILayout.LabelField("Volume", GUILayout.Width(50f));
var _volume = m_TrackChannels.GetArrayElementAtIndex(i).FindPropertyRelative("m_ChannelVolume");
_volume.floatValue = EditorGUILayout.Slider(_volume.floatValue, 0f, 1f);
}
EditorGUILayout.EndHorizontal();
GUILayout.Space(20f);
}
break;
default:
Debug.LogError("Missing case: " + m_Mode);
break;
}
}
There are no errors or warnings.
If I set a break point on line 15, then press F10, I get here in my code:
This is a PlasticSCM editor scipt.
It executes until line 61 and returns.
Execution then continues into another PlasticSCM editor script where it does nothing and returns.
That’s as far as I can trace the code before control is returned to Unity.
The execution never returns to my editor script and as I said there are no errors or warnings.
I’m so confused.