Ejemplo n.º 1
0
        public static void IntInput(string in_label, ref int in_currentValue, string in_savedName)
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(in_label + ": ", GUILayout.MaxWidth(MaxWidth));
            var tmpvar = EditorGUILayout.IntField(in_currentValue);

            if (!string.IsNullOrEmpty(in_savedName) && tmpvar != in_currentValue)
            {
                Google2uGUIUtil.SetInt(in_savedName, tmpvar);
            }
            in_currentValue = tmpvar;
            EditorGUILayout.EndHorizontal();
        }