Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.42k stars 306 forks source link

FIX: Input System 1.9.0 does not compile on Console Platforms (ISXB-963) #1971

Closed jfreire-unity closed 1 month ago

jfreire-unity commented 1 month ago

Description

Fix build issues on console platforms that do not support analytics.

Changes made

Guards code with ENABLE_CLOUD_SERVICES_ANALYTICS which was raising compilation errors on console platforms.

From documentation:

Important: Always make calls to the Analytics API inside the scope of an #if ENABLE_CLOUD_SERVICES_ANALYTICS statement to prevent compilation errors on platforms that do not support Analytics:

Possible there's some things we can do to improve our UNITY_ANALYTICS defines vs ENABLE_CLOUD_SERVICES_ANALYTICS use. I raised the question on what's the difference between them. cc @ekcoh for further discussions.

For now, this will likely unblock the console platform but we should revisit this in the future IMO. Raised task here

Testing

I tested data data was sent from the macOS editor and that there apparently there's no regression in the data that is being sent. But maybe @ekcoh can validate 100% once he's back from vacation. @Pauliusd01 if you can check that there's no regression in the data sent to the backend, that would be great (I mentioning you because you approved the PR with analytics #1808 ).

Also validated that at least one console platform the build error was fixed. @lewish-unity please make sure this branch fixes the error you reported.

Risk

I validated that the Editor analytics were sent with Unity 6, but couldn't validate with 2022.3f as the analytics debugger is not available for that version.

Checklist

Before review:

During merge:

After merge: