FairyGUI.UIPackage.RemoveAllPackages C# (CSharp) Method

RemoveAllPackages() public static method

public static RemoveAllPackages ( bool allowDestroyAssets ) : void
allowDestroyAssets bool
return void
        public static void RemoveAllPackages(bool allowDestroyAssets)
        {
            if (_packageInstById.Count > 0)
            {
                UIPackage[] pkgs = _packageList.ToArray();

                foreach (UIPackage pkg in pkgs)
                {
                    pkg.Dispose(allowDestroyAssets);
                }
            }
            _packageList.Clear();
            _packageInstById.Clear();
            _packageInstByName.Clear();
        }

Same methods

UIPackage::RemoveAllPackages ( ) : void

Usage Example

Example #1
0
 void OnApplicationQuit()
 {
     if (Application.isEditor)
     {
         UIPackage.RemoveAllPackages(true);
     }
 }
All Usage Examples Of FairyGUI.UIPackage::RemoveAllPackages