FairyGUI.Container.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public override void Dispose()
        {
            base.Dispose(); //Destroy GameObject tree first, avoid destroying each seperately;

            int numChildren = _children.Count;
            for (int i = numChildren - 1; i >= 0; --i)
            {
                DisplayObject obj = _children[i];
                obj.InternalSetParent(null); //Avoid RemoveParent call
                obj.Dispose();
            }
        }

Usage Example

Example #1
0
 static public int Dispose(IntPtr l)
 {
     try {
         FairyGUI.Container self = (FairyGUI.Container)checkSelf(l);
         self.Dispose();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.Container::Dispose