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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

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. :)