CanRecordModifications() приватный Метод

private CanRecordModifications ( ) : bool
Результат bool
Пример #1
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);
 }
Пример #2
0
 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();
     }
 }
Пример #3
0
        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);
        }
Пример #4
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();
            }
        }