UnityEngine.DrivenRectTransformTracker.Add C# (CSharp) Method

Add() public method

Add a RectTransform to be driven.

public Add ( UnityEngine driver, RectTransform rectTransform, DrivenTransformProperties drivenProperties ) : void
driver UnityEngine The object to drive properties.
rectTransform RectTransform The RectTransform to be driven.
drivenProperties DrivenTransformProperties The properties to be driven.
return void
        public void Add(UnityEngine.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 && CanRecordModifications())
            {
                RuntimeUndo.RecordObject(rectTransform, "Driving RectTransform");
            }
            this.m_Tracked.Add(rectTransform);
        }

Usage Example

コード例 #1
0
 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);
     }
 }
DrivenRectTransformTracker