Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

401
Vistas
Is there a more performant way to detect infrequently used input than Update()?

For example, while debugging I often have an input that allows me to reset the current scene. But, I don't use this so often, so maybe checking every frame in Update() is unnecessary?

I'm aware of InvokeRepeating(). But if I'm checking for GetButtonDown(), won't I need to press the button on the exact frame the invoked method is called?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Calling the input method in every frame isn't very slow. But you could check the input every x seconds and store the result in some class variable and use this variable for input detection. Expect some input latency with this method. The better approach in my opinion is to use the new input system:

Unity's new input system

Some tutorial for setting up this system

With this input system, you can create your own InputAction and subscribe to some event of it. An example would be:

new PlayerInput().Gameplay.Shoot.performed += OnShoot;

The PlayerInput class was generated by unity according to my settings in the editor: My Player input

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda