public bool CanCombine(UIWidget w) { if (NGUIDepthSetterTools.CanDoDrawCall(w)) { if (NGUIDepthSetterTools.CanDrawCallCombine(material, mainTexture, shader, w)) { return(true); } } return(false); }
public static MiniDrawCall CreateNewDC(UIWidget w, bool Empty = false) { if (Empty) { var ret = new MiniDrawCall(); ret.isEmpty = true; return(ret); } if (NGUIDepthSetterTools.CanDoDrawCall(w)) { var ret = new MiniDrawCall(); ret.widgetInformations.Add(new WidgetInformation() { widget = w }); ret.mainTexture = w.mainTexture; ret.shader = w.shader; ret.material = w.material; return(ret); } return(null); }