Skip to content
Snippets Groups Projects
Select Git revision
  • 4a4e91b5680c001466102edf07c33e54451bcb2f
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

InputFieldPanel.cs

Blame
  • InputFieldPanel.cs 639 B
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    
    public class InputFieldPanel : MonoBehaviour
    {
        private TMPro.TextMeshProUGUI output;
        private TMPro.TMP_InputField input;
        private string newline;
    
        void Start()
        {
            output = gameObject.GetComponentInChildren<TMPro.TextMeshProUGUI>();
            input = gameObject.GetComponentInChildren<TMPro.TMP_InputField>();
        }
    
        private void Update()
        {
            Fix();
        }
    
        public void Fix()
        {
            if (input == null || output == null)
                Start();
    
            output.text = input.text + " ";
        }
    }