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.
  2. Dismiss Notice

InputSystem Samples Error: No binding composite with name 'PointerInput' has been registered

Discussion in 'Input System' started by marwi, Jan 28, 2020.

  1. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    138
    I copied the PointerControls from new Input System Touch Samples (1.0.0 preview 3 / 4) along the touch code into another project. It is working in editor but on Android it crashes with this error:

    upload_2020-1-28_12-38-11.png

    2020.01.28 12:32:24.307 7212 7234 Error Unity InvalidOperationException: No binding composite with name 'PointerInput' has been registered

    and

    2020.01.28 10:37:08.036 5485 5507 Error Unity InvalidOperationException: Binding 'point:<Touchscreen>/touch3/position[;Touch]' is marked as being part of a composite but the preceding binding is not a composite

    2020.01.28 10:37:08.035 5485 5507 Error Unity InvalidOperationException while resolving binding 'point:<Touchscreen>/touch3/position[;Touch]' in action map 'PointerControls (UnityEngine.InputSystem.InputActionAsset):pointer'


    what am I missing? I tried saving PointerInput and I haven't changed any scripts (besides namespaces).
    I'm working in 19.3.0f5
     
  2. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    138
    is the static method possibly just called too late?
    It's definitely called, but AFTER I get all the errors that it's not registered:

    upload_2020-1-28_12-55-26.png
     
  3. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    138
    Ok using
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    instead of
    [RuntimeInitializeOnLoadMethod]
    solved it, because now it's registered before I actually subscribe to events (usually in OnEnable and RuntimeInitializeOnLoadMethod is by default initialized after awake)

    Would be nice if documentation would add that info
     
    hhoffren, pmelo, bouloss and 6 others like this.
  4. sharkwithlasers

    sharkwithlasers

    Joined:
    Dec 8, 2012
    Posts:
    23
    Thanks for the solution, marwi, you saved me a lot of time.

    I'm curious why [RuntimeInitializeOnLoadMethod] works on the sample code, but not when copying it to a new project however.
     
  5. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    138
    Glad i could be of help!

    well, documentation states

    "This is after the Awake method has been invoked. [...] Note: The execution order of methods marked [RuntimeInitializeOnLoadMethod] is not guaranteed."

    and if I remember correctly the sample doesnt register any listeners in OnEnable callbacks (but I might be wrong about that)
     
  6. spiralogy

    spiralogy

    Joined:
    Oct 10, 2013
    Posts:
    11
    Thanks for posting this, dude. It's amazing how broken Unity is, has been, and continues to be. Like, what the F***.
     
    pmelo likes this.
  7. pmelo

    pmelo

    Joined:
    Oct 30, 2013
    Posts:
    9
    Thank you! That did it for me too.
    Omg I wish I had seen your post yesterday, would've saved me a few hours. No idea how the sample project worked at all, indeed. Racing conditions are tricky to spot and fix. This should probably be raised as a bug. It was my first time using the new input system, and I had the exact same problem with mouse / touch input on a windows x86_64 build.