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 Add(UnityEngine.Object driver, RectTransform rectTransform, DrivenTransformProperties drivenProperties) { if (this.m_Tracked == null) { this.m_Tracked = new List <RectTransform>(); } if (!Application.isPlaying) { RuntimeUndo.RecordObject(rectTransform, "Driving RectTransform"); } this.m_Tracked.Add(rectTransform); rectTransform.drivenByObject = driver; rectTransform.drivenProperties |= drivenProperties; }
public void Add(Object driver, RectTransform rectTransform, DrivenTransformProperties drivenProperties) { if (m_Tracked == null) { m_Tracked = new List <RectTransform>(); } if (!Application.isPlaying && CanRecordModifications() && !s_BlockUndo) { RuntimeUndo.RecordObject(rectTransform, "Driving RectTransform"); } rectTransform.drivenByObject = driver; rectTransform.drivenProperties = rectTransform.drivenProperties | drivenProperties; 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); }
public void Clear() { if (m_Tracked != null) { for (int i = 0; i < m_Tracked.Count; i++) { if (m_Tracked[i] != null) { if (!Application.isPlaying && CanRecordModifications() && !s_BlockUndo) { RuntimeUndo.RecordObject(m_Tracked[i], "Driving RectTransform"); } m_Tracked[i].drivenByObject = null; } } m_Tracked.Clear(); } }
/// <summary> /// <para>Clear the list of RectTransforms being driven.</para> /// </summary> public void Clear() { if (this.m_Tracked == null) { return; } for (int index = 0; index < this.m_Tracked.Count; ++index) { if ((Object)this.m_Tracked[index] != (Object)null) { if (!Application.isPlaying) { RuntimeUndo.RecordObject((Object)this.m_Tracked[index], "Driving RectTransform"); } this.m_Tracked[index].drivenByObject = (Object)null; } } this.m_Tracked.Clear(); }
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 void SetTransformParentUndo(Transform transform, Transform newParent, string name) { RuntimeUndo.SetTransformParent(transform, newParent, true, name); }