Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Stop InputField from exiting when pressing enter?

Discussion in 'Immediate Mode GUI (IMGUI)' started by kaysteinhoff2003, Jul 20, 2020.

  1. kaysteinhoff2003

    kaysteinhoff2003

    Joined:
    Mar 22, 2020
    Posts:
    19
    Hi there! I'm trying to make a coding game and so far have tried to let the user input his code through an input field but I ran into the problem of the input field exiting when enter is pressed. Can I disable this? Or should I try to let the user input his code another way?
     
  2. kaysteinhoff2003

    kaysteinhoff2003

    Joined:
    Mar 22, 2020
    Posts:
    19
    E
    Edit: I could solve the problem myself. I just set the content type to custom and then changed the line type from single to Multi Line Newline. :)