FairyGUI.Relations.ClearFor C# (CSharp) Method

ClearFor() public method

public ClearFor ( GObject target ) : void
target GObject
return void
        public void ClearFor(GObject target)
        {
            int cnt = _items.Count;
            int i = 0;
            while (i < cnt)
            {
                RelationItem item = _items[i];
                if (item.target == target)
                {
                    item.Dispose();
                    _items.RemoveAt(i);
                    cnt--;
                }
                else
                    i++;
            }
        }

Usage Example

 static public int ClearFor(IntPtr l)
 {
     try {
         FairyGUI.Relations self = (FairyGUI.Relations)checkSelf(l);
         FairyGUI.GObject   a1;
         checkType(l, 2, out a1);
         self.ClearFor(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.Relations::ClearFor