static public int IsRaycastLocationValid(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); UnityEngine.Vector2 a1; checkType(l, 2, out a1); UnityEngine.Camera a2; checkType(l, 3, out a2); var ret = self.IsRaycastLocationValid(a1, a2); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int AddClippable(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); UnityEngine.UI.IClippable a1; checkType(l, 2, out a1); self.AddClippable(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int get_rectTransform(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); pushValue(l, true); pushValue(l, self.rectTransform); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
public static void GetRectMasksForClip(RectMask2D clipper, List<RectMask2D> masks) { masks.Clear(); List<Canvas> results = ListPool<Canvas>.Get(); List<RectMask2D> list2 = ListPool<RectMask2D>.Get(); clipper.transform.GetComponentsInParent<RectMask2D>(false, list2); if (list2.Count > 0) { clipper.transform.GetComponentsInParent<Canvas>(false, results); for (int i = list2.Count - 1; i >= 0; i--) { if (!list2[i].IsActive()) { continue; } bool flag = true; for (int j = results.Count - 1; j >= 0; j--) { if (!IsDescendantOrSelf(results[j].transform, list2[i].transform) && results[j].overrideSorting) { flag = false; break; } } if (flag) { masks.Add(list2[i]); } } } ListPool<RectMask2D>.Release(list2); ListPool<Canvas>.Release(results); }
static public int PerformClipping(IntPtr l) { try { UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); self.PerformClipping(); return(0); } catch (Exception e) { return(error(l, e)); } }
static public int get_rectTransform(IntPtr l) { try { UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); pushValue(l, self.rectTransform); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_canvasRect(IntPtr l) { try { UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); pushValue(l, true); pushValue(l, self.canvasRect); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int RemoveClippable(IntPtr l) { try { UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); UnityEngine.UI.IClippable a1; checkType(l, 2, out a1); self.RemoveClippable(a1); return(0); } catch (Exception e) { return(error(l, e)); } }
static int PerformClipping(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.RectMask2D obj = (UnityEngine.UI.RectMask2D)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.RectMask2D)); obj.PerformClipping(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RemoveClippable(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.UI.RectMask2D obj = (UnityEngine.UI.RectMask2D)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.RectMask2D)); UnityEngine.UI.IClippable arg0 = (UnityEngine.UI.IClippable)ToLua.CheckObject(L, 2, typeof(UnityEngine.UI.IClippable)); obj.RemoveClippable(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int IsRaycastLocationValid(IntPtr l) { try { UnityEngine.UI.RectMask2D self = (UnityEngine.UI.RectMask2D)checkSelf(l); UnityEngine.Vector2 a1; checkType(l, 2, out a1); UnityEngine.Camera a2; checkType(l, 3, out a2); var ret = self.IsRaycastLocationValid(a1, a2); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static int get_rectTransform(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.UI.RectMask2D obj = (UnityEngine.UI.RectMask2D)o; UnityEngine.RectTransform ret = obj.rectTransform; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index rectTransform on a nil value" : e.Message)); } }
static int IsRaycastLocationValid(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.UI.RectMask2D obj = (UnityEngine.UI.RectMask2D)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.RectMask2D)); UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2); UnityEngine.Camera arg1 = (UnityEngine.Camera)ToLua.CheckUnityObject(L, 3, typeof(UnityEngine.Camera)); bool o = obj.IsRaycastLocationValid(arg0, arg1); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_canvasRect(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.UI.RectMask2D obj = (UnityEngine.UI.RectMask2D)o; UnityEngine.Rect ret = obj.canvasRect; ToLua.PushValue(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index canvasRect on a nil value")); } }
/// <summary> /// Search for all RectMask2D that apply to the given RectMask2D (includes self). /// </summary> /// <param name="clipper">Starting clipping object.</param> /// <param name="masks">The list of Rect masks</param> public static void GetRectMasksForClip(RectMask2D clipper, List <RectMask2D> masks) { masks.Clear(); List <Canvas> canvasComponents = ListPool <Canvas> .Get(); List <RectMask2D> rectMaskComponents = ListPool <RectMask2D> .Get(); clipper.transform.GetComponentsInParent(false, rectMaskComponents); if (rectMaskComponents.Count > 0) { clipper.transform.GetComponentsInParent(false, canvasComponents); for (int i = rectMaskComponents.Count - 1; i >= 0; i--) { if (!rectMaskComponents[i].IsActive()) { continue; } bool shouldAdd = true; for (int j = canvasComponents.Count - 1; j >= 0; j--) { if (!IsDescendantOrSelf(canvasComponents[j].transform, rectMaskComponents[i].transform) && canvasComponents[j].overrideSorting) { shouldAdd = false; break; } } if (shouldAdd) { masks.Add(rectMaskComponents[i]); } } } ListPool <RectMask2D> .Release(rectMaskComponents); ListPool <Canvas> .Release(canvasComponents); }
public static void GetRectMasksForClip(RectMask2D clipper, List<RectMask2D> masks) { masks.Clear(); Transform parent = clipper.transform; List<Component> results = ListPool<Component>.Get(); while (parent != null) { parent.GetComponents(typeof(RectMask2D), results); for (int i = 0; i < results.Count; i++) { if ((results[i] != null) && ((RectMask2D) results[i]).IsActive()) { masks.Add((RectMask2D) results[i]); } } if (parent.GetComponent<Canvas>() != null) { break; } parent = parent.parent; } ListPool<Component>.Release(results); }
public static void GetRectMasksForClip(RectMask2D clipper, List <RectMask2D> masks) { masks.Clear(); Transform transform = clipper.transform; List <Component> list = ListPool <Component> .Get(); for (; (Object)transform != (Object)null; transform = transform.parent) { transform.GetComponents(typeof(RectMask2D), list); for (int index = 0; index < list.Count; ++index) { if ((Object)list[index] != (Object)null && ((UIBehaviour)list[index]).IsActive()) { masks.Add((RectMask2D)list[index]); } } if ((bool)((Object)transform.GetComponent <Canvas>())) { break; } } ListPool <Component> .Release(list); }
public static void GetRectMasksForClip(RectMask2D clipper, List <RectMask2D> masks) { masks.Clear(); List <Canvas> results = ListPool <Canvas> .Get(); List <RectMask2D> list2 = ListPool <RectMask2D> .Get(); clipper.transform.GetComponentsInParent <RectMask2D>(false, list2); if (list2.Count > 0) { clipper.transform.GetComponentsInParent <Canvas>(false, results); for (int i = list2.Count - 1; i >= 0; i--) { if (!list2[i].IsActive()) { continue; } bool flag = true; for (int j = results.Count - 1; j >= 0; j--) { if (!IsDescendantOrSelf(results[j].transform, list2[i].transform) && results[j].overrideSorting) { flag = false; break; } } if (flag) { masks.Add(list2[i]); } } } ListPool <RectMask2D> .Release(list2); ListPool <Canvas> .Release(results); }
public static void GetRectMasksForClip(RectMask2D clipper, List <RectMask2D> masks) { masks.Clear(); Transform parent = clipper.transform; List <Component> results = ListPool <Component> .Get(); while (parent != null) { parent.GetComponents(typeof(RectMask2D), results); for (int i = 0; i < results.Count; i++) { if ((results[i] != null) && ((RectMask2D)results[i]).IsActive()) { masks.Add((RectMask2D)results[i]); } } if (parent.GetComponent <Canvas>() != null) { break; } parent = parent.parent; } ListPool <Component> .Release(results); }
public static void GetRectMasksForClip(RectMask2D clipper, List<RectMask2D> masks) { masks.Clear(); Transform transform = clipper.transform; List<Component> list = ListPool<Component>.Get(); for (; (Object) transform != (Object) null; transform = transform.parent) { transform.GetComponents(typeof (RectMask2D), list); for (int index = 0; index < list.Count; ++index) { if ((Object) list[index] != (Object) null && ((UIBehaviour) list[index]).IsActive()) masks.Add((RectMask2D) list[index]); } if ((bool) ((Object) transform.GetComponent<Canvas>())) break; } ListPool<Component>.Release(list); }
public static void GetRectMasksForClip(RectMask2D clipper, List <RectMask2D> masks) { masks.Clear(); clipper.transform.GetComponentsInParent <RectMask2D>(false, masks); }
public static void GetRectMasksForClip(RectMask2D clipper, List<RectMask2D> masks) { masks.Clear(); clipper.transform.GetComponentsInParent<RectMask2D>(false, masks); }
public static void GetRectMasksForClip(RectMask2D clipper, List<RectMask2D> masks) { masks.Clear(); var t = clipper.transform; var components = ListPool<Component>.Get(); while (t != null) { t.GetComponents(typeof(RectMask2D), components); for (var i = 0; i < components.Count; ++i) { if (components[i] != null && ((RectMask2D)components[i]).IsActive()) masks.Add((RectMask2D)components[i]); } var canvas = t.GetComponent<Canvas>(); if (canvas) break; t = t.parent; } ListPool<Component>.Release(components); }