Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved NullReferenceException in InputActionMap.ResolveBindings in build only

Discussion in 'Input System' started by krooq, Aug 11, 2022.

  1. krooq

    krooq

    Joined:
    Jan 30, 2013
    Posts:
    175
    Hi all,

    I'm using the ne input system and have no issues in the editor.
    But when I create a build I get the following exception when I try to enable an action map.

    Has anyone seen this before? Why is this happening?
    I tried to inspect the code at the exception site but its all kinds of confusing and I don't think this ResolveBindings method should throw an exception.

    I'm in Unity 2021.3.7 with input system 1.3.0.
    I'm also using DOTS but can't really see how that's relevant.
     
  2. krooq

    krooq

    Joined:
    Jan 30, 2013
    Posts:
    175
    Solution TL;DR, do all your action map setup and enabling at runtime and not in the editor XD
    This should have been obvious since how can it possibly know what control devices are being used at build time.