Rasagar/Library/PackageCache/com.unity.cinemachine/Samples~/Cinemachine Example Scenes/Shared/Scripts/InputSystemHelper.cs

24 lines
968 B
C#
Raw Normal View History

2024-08-26 13:07:20 -07:00
using UnityEngine;
namespace Cinemachine.Examples
{
public static class InputSystemHelper
{
static float s_LastMessageTime = -10;
// Logs warning every 5 seconds
public static void EnableBackendsWarningMessage()
{
if (Time.realtimeSinceStartup - s_LastMessageTime > 5)
{
Debug.Log(
"Old input backends are disabled. Cinemachine examples use Unitys classic input system. " +
"To enable classic input: Edit > Project Settings > Player, " +
"set Active Input Handling to Both!\n" +
"Note: This is probably because the Input System Package has been added to the project. To use " +
"Cinemachine Virtual Cameras with the Input System Package, add CinemachineInputProvider component to them.");
s_LastMessageTime = Time.realtimeSinceStartup;
}
}
}
}