Skip to content

Commit cd80ef5

Browse files
committed
Guard inspector warning with PWA define
1 parent 3300fd0 commit cd80ef5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,19 @@ public override void OnInspectorGUI()
8181
EditorGUILayout.PropertyField(m_ActionsProperty);
8282
var actionsWereChanged = false;
8383

84+
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
85+
// Check for if we're using project-wide actions to raise a warning message.
8486
if (m_ActionsProperty.objectReferenceValue != null)
8587
{
8688
InputActionAsset actions = m_ActionsProperty.objectReferenceValue as InputActionAsset;
87-
// Check for if we're using project-wide actions to raise warning
8889
if (actions == InputSystem.actions)
8990
{
9091
EditorGUILayout.HelpBox("Project-wide actions asset is not recommended to be used with Player " +
9192
"Input because it is a singleton reference and all actions maps are enabled by default.\r\n",
9293
MessageType.Warning);
9394
}
9495
}
95-
96+
#endif
9697
if (EditorGUI.EndChangeCheck() || !m_ActionAssetInitialized || CheckIfActionAssetChanged())
9798
{
9899
OnActionAssetChange();

0 commit comments

Comments
 (0)