Exemplo n.º 1
0
        public static int IntTextField(ref int value, String name = null, params GUILayoutOption[] options)
        {
            String text = $"{value}";

            UI.TextField(ref text, name, options);
            Int32.TryParse(text, out value);
            return(value);
        }
Exemplo n.º 2
0
        public static float FloatTextField(ref float value, String name = null, params GUILayoutOption[] options)
        {
            String text = $"{value}";

            UI.TextField(ref text, name, options);
            var val = value;

            if (float.TryParse(text, out val))
            {
                value = val;
            }
            return(value);
        }