public TextMatrix(Matrix4x4 existing) { for (var i = 0; i < _texts.Length; i++) { _texts[i] = new TextFloat(0); } Value = existing; }
public GUIFloat(System.Object data, FieldInfo fi) : base(data, fi) { TextFloat = new TextFloat((float)fi.GetValue(data)); _onGUI = () => { GUILayout.BeginHorizontal(); GUILayout.Label(string.Format("{0} ", fi.Name), GUILayout.ExpandWidth(false)); TextFloat.StrValue = GUILayout.TextField(TextFloat.StrValue, GUILayout.ExpandWidth(true), GUILayout.MinWidth(30f)); GUILayout.EndHorizontal(); Save(); }; }
public System.Action GenerateGUIFloat(FieldInfo fi) { var textFloat = new TextFloat((float)fi.GetValue(data)); return(() => { GUILayout.BeginHorizontal(); GUILayout.Label(string.Format("{0} ", fi.Name), GUILayout.ExpandWidth(false)); textFloat.StrValue = GUILayout.TextField(textFloat.StrValue, GUILayout.ExpandWidth(true), GUILayout.MinWidth(30f)); GUILayout.EndHorizontal(); fi.SetValue(data, textFloat.Value); }); }
public TextMatrix(Matrix4x4 existing) { for (var i = 0; i < _texts.Length; i++) _texts[i] = new TextFloat(0); Value = existing; }