Skip to content

Commit 0a25029

Browse files
authored
FIX: Fixed warning being generated during player build due to use of new with camera property. (case 1174688) (#1071)
1 parent 932d4e4 commit 0a25029

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ however, it has to be formatted properly to pass verification tests.
1010
## [Unreleased]
1111

1212
### Fixed
13+
- Fixed CS0109 warning being generated during player build due to use of `new` with the `PlayerInput.camera property`. (case 1174688)
1314

1415
#### Actions
1516

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,12 @@ public event Action<PlayerInput> onControlsChanged
695695
///
696696
/// Associating a camera with a player is necessary only when using split-screen (see <see cref="PlayerInputManager.splitScreen"/>).
697697
/// </remarks>
698-
public new Camera camera
698+
public
699+
#if UNITY_EDITOR
700+
// camera property is deprecated and only available in Editor.
701+
new
702+
#endif
703+
Camera camera
699704
{
700705
get => m_Camera;
701706
set => m_Camera = value;

0 commit comments

Comments
 (0)