A component can be designed drive a RectTransform. The DrivenRectTransformTracker struct is used to specify which RectTransforms it is driving.
static public int constructor(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.DrivenRectTransformTracker o; o = new UnityEngine.DrivenRectTransformTracker(); pushValue(l, true); pushValue(l, o); 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 constructor(IntPtr l) { try { UnityEngine.DrivenRectTransformTracker o; o=new UnityEngine.DrivenRectTransformTracker(); pushValue(l,true); pushValue(l,o); return 2; } catch(Exception e) { return error(l,e); } }
static public int constructor(IntPtr l) { try { UnityEngine.DrivenRectTransformTracker o; o = new UnityEngine.DrivenRectTransformTracker(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { UnityEngine.DrivenRectTransformTracker o; o = new UnityEngine.DrivenRectTransformTracker(); pushValue(l, o); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public static int constructor(IntPtr l) { try { UnityEngine.DrivenRectTransformTracker o; o=new UnityEngine.DrivenRectTransformTracker(); pushValue(l,o); return 1; } catch(Exception e) { LuaDLL.luaL_error(l, e.ToString()); return 0; } }
static public int Clear(IntPtr l) { try{ UnityEngine.DrivenRectTransformTracker self = (UnityEngine.DrivenRectTransformTracker)checkSelf(l); self.Clear(); setBack(l, self); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public void Add(Object driver, RectTransform rectTransform, DrivenTransformProperties drivenProperties) { if (this.m_Tracked == null) { this.m_Tracked = new List <RectTransform>(); } rectTransform.drivenByObject = driver; rectTransform.drivenProperties |= drivenProperties; if (!Application.isPlaying && DrivenRectTransformTracker.CanRecordModifications()) { RuntimeUndo.RecordObject(rectTransform, "Driving RectTransform"); } this.m_Tracked.Add(rectTransform); }
public void Clear() { if (this.m_Tracked != null) { for (int i = 0; i < this.m_Tracked.Count; i++) { if (this.m_Tracked[i] != null) { if (!Application.isPlaying && DrivenRectTransformTracker.CanRecordModifications()) { RuntimeUndo.RecordObject(this.m_Tracked[i], "Driving RectTransform"); } this.m_Tracked[i].drivenByObject = null; } } this.m_Tracked.Clear(); } }
public void Add(Object driver, RectTransform rectTransform, DrivenTransformProperties drivenProperties) { bool flag = this.m_Tracked == null; if (flag) { this.m_Tracked = new List <RectTransform>(); } bool flag2 = !Application.isPlaying && DrivenRectTransformTracker.CanRecordModifications() && !DrivenRectTransformTracker.s_BlockUndo; if (flag2) { RuntimeUndo.RecordObject(rectTransform, "Driving RectTransform"); } rectTransform.drivenByObject = driver; rectTransform.drivenProperties |= drivenProperties; this.m_Tracked.Add(rectTransform); }
static public int Add(IntPtr l) { try{ UnityEngine.DrivenRectTransformTracker self = (UnityEngine.DrivenRectTransformTracker)checkSelf(l); UnityEngine.Object a1; checkType(l, 2, out a1); UnityEngine.RectTransform a2; checkType(l, 3, out a2); UnityEngine.DrivenTransformProperties a3; checkEnum(l, 4, out a3); self.Add(a1, a2, a3); setBack(l, self); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public void Clear() { bool flag = this.m_Tracked != null; if (flag) { for (int i = 0; i < this.m_Tracked.Count; i++) { bool flag2 = this.m_Tracked[i] != null; if (flag2) { bool flag3 = !Application.isPlaying && DrivenRectTransformTracker.CanRecordModifications() && !DrivenRectTransformTracker.s_BlockUndo; if (flag3) { RuntimeUndo.RecordObject(this.m_Tracked[i], "Driving RectTransform"); } this.m_Tracked[i].drivenByObject = null; this.m_Tracked[i].drivenProperties = DrivenTransformProperties.None; } } this.m_Tracked.Clear(); } }
internal static bool CanRecordModifications() { return(!DrivenRectTransformTracker.IsInAnimationMode() && (DrivenRectTransformTracker.IsUndoingOrRedoing() || DrivenRectTransformTracker.HasUndoRecordObjects())); }