I've encountered a small error when I imported the UMA integration into Unity. Inside the UMACharacterBuilderInspector script, there's a variable called addFirstPersonPerspective, that's created if the First Person Controller is installed.
Because I'm only using TPC, the variable isn't created. But it's referenced near the bottom of the method, without the FIRST_PERSON_CONTROLLER preprocessor.
I fixed this small error by wrapping the if statement around the same preprocessor statement.
C#:
#if FIRST_PERSON_CONTROLLER
EditorGUILayout.LabelField("First Person", InspectorStyles.BoldLabel);
var addFirstPersonPerspective = PropertyFromName("m_AddFirstPersonPerspective");
EditorGUILayout.PropertyField(addFirstPersonPerspective);
if (addFirstPersonPerspective.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(PropertyFromName("m_FirstPersonMovementType"));
EditorGUILayout.PropertyField(PropertyFromName("m_FirstPersonHiddenObjectNames"), true);
EditorGUILayout.PropertyField(PropertyFromName("m_InvisibleShadowCastorMaterial"));
EditorGUILayout.PropertyField(PropertyFromName("m_FirstPersonBaseObjects"), true);
EditorGUI.indentLevel--;
}
GUILayout.Space(5);
#endif
Because I'm only using TPC, the variable isn't created. But it's referenced near the bottom of the method, without the FIRST_PERSON_CONTROLLER preprocessor.
C#:
if (addFirstPersonPerspective.boolValue && addThirdPersonPerspective.boolValue) {
EditorGUILayout.PropertyField(PropertyFromName("m_StartFirstPersonPerspective"));
}
I fixed this small error by wrapping the if statement around the same preprocessor statement.
C#:
#if FIRST_PERSON_CONTROLLER
if (addFirstPersonPerspective.boolValue && addThirdPersonPerspective.boolValue) {
EditorGUILayout.PropertyField(PropertyFromName("m_StartFirstPersonPerspective"));
}
#endif