FairyGUI.UIPackage
class FairyGUI.UIPackage
Fields and Properties:
- (static)
bool FairyGUI.UIPackage.unloadBundleByFGUI- Description: Unload UIAssetBundle by FairyGUI system. if use AssetBundlesManager set value to false then unload UIAssetBundle by AssetBundlesManager
- (static)
string FairyGUI.UIPackage.URL_PREFIX string id- Description: Package id. It is generated by the Editor.
string name- Description: Package name.
IReadOnlyList<FairyGUI.PackageItem> Items- (static)
string FairyGUI.UIPackage.branch- Description:
string assetPath- Description:
string customId- Description: Set a custom id for package, then you can use it in GetById.
AssetBundle resBundle- Description:
Dictionary<string, string>[] dependencies- Description: Retrieves a list of package IDs that the current package depends on.
Constructors:
FairyGUI.UIPackage.New()
Methods:
- (static)
string FairyGUI.UIPackage.GetVar(string)- Description:
- (static)
void FairyGUI.UIPackage.SetVar(string, string)- Description:
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.GetById(string)- Description: Return a UIPackage with a certain id.
- Parameter id: ID of the package.
- Return: UIPackage
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.GetByName(string)- Description: Return a UIPackage with a certain name.
- Parameter name: Name of the package.
- Return: UIPackage
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.AddPackage(AssetBundle)- Description: Add a UI package from assetbundle.
- Parameter bundle: A assetbundle.
- Return: UIPackage
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.AddPackage(AssetBundle, AssetBundle)- Description: Add a UI package from two assetbundles. desc and res can be same.
- Parameter desc: A assetbunble contains description file.
- Parameter res: A assetbundle contains resources.
- Return: UIPackage
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.AddPackage(AssetBundle, AssetBundle, string)- Description: Add a UI package from two assetbundles with a optional main asset name.
- Parameter desc: A assetbunble contains description file.
- Parameter res: A assetbundle contains resources.
- Parameter mainAssetName: Main asset name. e.g. Basics_fui
- Return: UIPackage
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.AddPackage(string)- Description: Add a UI package from a path relative to Unity Resources path.
- Parameter descFilePath: Path relative to Unity Resources path.
- Return: UIPackage
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.AddPackage(string, FairyGUI.UIPackage.LoadResource)- Description: Loads a package using a custom loading method.
- Parameter assetPath: The asset path for the package.
- Parameter loadFunc: A custom function used to load the package.
- Return:
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.AddPackage(byte[], string, FairyGUI.UIPackage.LoadResource)- Description: Load Package by custom load method.
- Parameter descData: Description file data
- Parameter assetNamePrefix: Prefix of the resource file name. The file name would be in format of 'assetNamePrefix_resFileName'. It can be empty.
- Parameter loadFunc: Load method
- Return:
- (static)
FairyGUI.UIPackage FairyGUI.UIPackage.AddPackage(byte[], string, FairyGUI.UIPackage.LoadResourceAsync)- Description: Load Package async by custom load method.
- Parameter descData: Description file data
- Parameter assetNamePrefix: refix of the resource file name. The file name would be in format of 'assetNamePrefix_resFileName'. It can be empty.
- Parameter loadFunc: Load method
- Return:
- (static)
void FairyGUI.UIPackage.RemovePackage(string)- Description: Remove a package. All resources in this package will be disposed.
- Parameter packageIdOrName:
- (static)
void FairyGUI.UIPackage.RemoveAllPackages()- Description:
- (static)
List<FairyGUI.UIPackage> FairyGUI.UIPackage.GetPackages()- Description:
- Return:
- (static)
FairyGUI.GObject FairyGUI.UIPackage.CreateObject(string, string)- Description: Create a UI object.
- Parameter pkgName: Package name.
- Parameter resName: Resource name.
- Return: A UI object.
- (static)
FairyGUI.GObject FairyGUI.UIPackage.CreateObject(string, string, System.Type)- Description: Create a UI object.
- Parameter pkgName: Package name.
- Parameter resName: Resource name.
- Parameter userClass: Custom implementation of this object.
- Return: A UI object.
- (static)
FairyGUI.GObject FairyGUI.UIPackage.CreateObjectFromURL(string)- Description: Create a UI object.
- Parameter url: Resource url.
- Return: A UI object.
- (static)
FairyGUI.GObject FairyGUI.UIPackage.CreateObjectFromURL(string, System.Type)- Description: Create a UI object.
- Parameter url: Resource url.
- Parameter userClass: Custom implementation of this object.
- Return: A UI object.
- (static)
void FairyGUI.UIPackage.CreateObjectAsync(string, string, FairyGUI.UIPackage.CreateObjectCallback) - (static)
void FairyGUI.UIPackage.CreateObjectFromURL(string, FairyGUI.UIPackage.CreateObjectCallback) - (static)
object FairyGUI.UIPackage.GetItemAsset(string, string)- Description: Get a asset with a certain name.
- Parameter pkgName: Package name.
- Parameter resName: Resource name.
- Return: If resource is atlas, returns NTexture; If resource is sound, returns AudioClip.
- (static)
object FairyGUI.UIPackage.GetItemAssetByURL(string)- Description: Get a asset with a certain name.
- Parameter url: Resource url.
- Return: If resource is atlas, returns NTexture; If resource is sound, returns AudioClip.
- (static)
string FairyGUI.UIPackage.GetItemURL(string, string)- Description: Get url of an item in package.
- Parameter pkgName: Package name.
- Parameter resName: Resource name.
- Return: Url.
- (static)
FairyGUI.PackageItem FairyGUI.UIPackage.GetItemByURL(string) - (static)
string FairyGUI.UIPackage.NormalizeURL(string)- Description: Converts a 'ui://packageName/componentName' URL format to the internal ID format. If the input URL is already in the internal ID format, it is returned directly. This method also performs a format check, returning null if an incorrect URL is provided.
- Parameter url:
- Return:
bool LoadPackage(FairyGUI.Utils.ByteBuffer, string)void LoadAllAssets()- Description:
void UnloadAssets()- Description:
void ReloadAssets()- Description:
void ReloadAssets(AssetBundle)- Description:
FairyGUI.GObject CreateObject(string)- Description:
- Parameter resName:
- Return:
FairyGUI.GObject CreateObject(string, System.Type)- Description:
- Parameter resName:
- Parameter userClass:
- Return:
void CreateObjectAsync(string, FairyGUI.UIPackage.CreateObjectCallback)object GetItemAsset(string)- Description:
- Parameter resName:
- Return:
List<FairyGUI.PackageItem> GetItems()FairyGUI.PackageItem GetItem(string)FairyGUI.PackageItem GetItemByName(string)object GetItemAsset(FairyGUI.PackageItem)void SetItemAsset(FairyGUI.PackageItem, object, FairyGUI.DestroyMethod)- Description:
- Parameter item:
- Parameter asset:
- Parameter destroyMethod:
- (static)
List<string> FairyGUI.UIPackage.GetAtlasFromPackage(byte[])- Description: Retrieves a list of image file names required by the UI.
- Parameter data: xxx.bytes files.
- Return: A list of image files.