InputSystemHelper.cs 968 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. namespace Cinemachine.Examples
  3. {
  4. public static class InputSystemHelper
  5. {
  6. static float s_LastMessageTime = -10;
  7. // Logs warning every 5 seconds
  8. public static void EnableBackendsWarningMessage()
  9. {
  10. if (Time.realtimeSinceStartup - s_LastMessageTime > 5)
  11. {
  12. Debug.Log(
  13. "Old input backends are disabled. Cinemachine examples use Unity’s classic input system. " +
  14. "To enable classic input: Edit > Project Settings > Player, " +
  15. "set Active Input Handling to Both!\n" +
  16. "Note: This is probably because the Input System Package has been added to the project. To use " +
  17. "Cinemachine Virtual Cameras with the Input System Package, add CinemachineInputProvider component to them.");
  18. s_LastMessageTime = Time.realtimeSinceStartup;
  19. }
  20. }
  21. }
  22. }