static int ResetAnchors(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); UIRect obj = (UIRect)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UIRect"); obj.ResetAnchors(); return(0); }
static int ResetAnchors(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); UIRect obj = LuaScriptMgr.GetNetObject <UIRect>(L, 1); obj.ResetAnchors(); return(0); }
static public int ResetAnchors(IntPtr l) { try { UIRect self = (UIRect)checkSelf(l); self.ResetAnchors(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static int ResetAnchors(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UIRect obj = (UIRect)ToLua.CheckObject <UIRect>(L, 1); obj.ResetAnchors(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static int ResetAnchors(IntPtr l) { int result; try { UIRect uIRect = (UIRect)LuaObject.checkSelf(l); uIRect.ResetAnchors(); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
void Start() { _uiItem = this.GetSafeComponent <UIRect>(); //float w = Screen.width ; //float h = Screen.height; //float res = h/w; //Debug.LogWarning(res); _uiItem.leftAnchor.target = _uiItem.rightAnchor.target = transform.root.Find("Panel1"); _uiItem.leftAnchor.Set(0f, 0f); _uiItem.rightAnchor.Set(1f, 0f); _uiItem.ResetAnchors(); }
private static int ResetAnchors(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 1); UIRect uIRect = (UIRect)ToLua.CheckObject(L, 1, typeof(UIRect)); uIRect.ResetAnchors(); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
void Start () { _uiItem = this.GetSafeComponent<UIRect>(); //float w = Screen.width ; //float h = Screen.height; //float res = h/w; //Debug.LogWarning(res); _uiItem.leftAnchor.target = _uiItem.rightAnchor.target = transform.root.Find("Panel1"); _uiItem.leftAnchor.Set(0f, 0f); _uiItem.rightAnchor.Set(1f, 0f); _uiItem.ResetAnchors(); }
public void RemoveAnchors(bool ignoreOnEnable, bool ignoreOnStart, bool ignoreUpdate) { foreach (Transform transform in this.GetHaveUIRectObjects <UIRect>(this._isRootThisObject, this._isIncludeRootObject, this._isIncludeThisObject)) { UIRect component = transform.GetComponent <UIRect>(); if (!ignoreOnEnable || component.updateAnchors != UIRect.AnchorUpdate.OnEnable) { if (!ignoreOnStart || component.updateAnchors != UIRect.AnchorUpdate.OnStart) { if (!ignoreUpdate || component.updateAnchors != UIRect.AnchorUpdate.OnUpdate) { component.topAnchor.target = null; component.bottomAnchor.target = null; component.leftAnchor.target = null; component.rightAnchor.target = null; component.ResetAnchors(); } } } } }