public static TextProxy GetTextProxy(this Transform t) { SharedTextProxy c = t.GetComponent <SharedTextProxy>(); if (c == null) { c = t.gameObject.AddComponent <SharedTextProxy>(); } return(c.Proxy ?? (c.Proxy = new TextProxy(t))); }
public static TextProxy GetTextProxy(this GameObject go) { SharedTextProxy c = go.GetComponent <SharedTextProxy>(); if (c == null) { c = go.AddComponent <SharedTextProxy>(); } return(c.Proxy ?? (c.Proxy = new TextProxy(go))); }