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

Question ReadValue<TValue>() what type is TValue?

Discussion in 'Input System' started by equal, Jul 11, 2023.

  1. equal

    equal

    Joined:
    Dec 14, 2012
    Posts:
    77
    Hi,

    what Types can i use in TValue?
    where can i lookup those Types? (Manuals or Generated InputAsset?)

    Thought its the "Control Type"
    upload_2023-7-11_18-21-29.png
    But that doesnt seem to be right
    upload_2023-7-11_18-22-56.png
    Sofar i know about float and vec2, but is there more (ignoring custom made ones)?
    How about Quaternion Type?
     
  2. equal

    equal

    Joined:
    Dec 14, 2012
    Posts:
    77
    The awnser is that the Runtime Error will tell you that it can not read whatever you write there and that it expects another Type. Then you know what to write.

    Best Method so far, just use bool and run it.