Click or drag to resize

UIPackage Class

A UI Package contains a description file and some texture,sound assets.
Inheritance Hierarchy
SystemObject
  FairyGUIUIPackage

Namespace:  FairyGUI
Assembly:  FairyGUI (in FairyGUI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class UIPackage

The UIPackage type exposes the following members.

Constructors
  NameDescription
Public methodUIPackage
Initializes a new instance of the UIPackage class
Top
Properties
  NameDescription
Public propertyassetPath
The path relative to the resources folder.
Public propertycustomId
Set a custom id for package, then you can use it in GetById.
Public propertyid
Package id. It is generated by the Editor, or set by customId.
Public propertyname
Package name.
Public propertyresBundle
Top
Methods
  NameDescription
Public methodStatic memberAddPackage(String)
Add a UI package from a path relative to Unity Resources path.
Public methodStatic memberAddPackage(AssetBundle)
Add a UI package from assetbundle.
Public methodStatic memberAddPackage(String, UIPackageLoadResource)
使用自定义的加载方式载入一个包。
Public methodStatic memberAddPackage(AssetBundle, AssetBundle)
Add a UI package from two assetbundles. desc and res can be same.
Public methodStatic memberAddPackage(Byte, String, UIPackageLoadResource)
使用自定义的加载方式载入一个包。
Public methodStatic memberAddPackage(AssetBundle, AssetBundle, String)
Add a UI package from two assetbundles with a optional main asset name.
Public methodCreateObject(String)
Public methodStatic memberCreateObject(String, String)
Create a UI object.
Public methodCreateObject(String, Type)
Public methodStatic memberCreateObject(String, String, Type)
Create a UI object.
Public methodCreateObjectAsync(String, UIPackageCreateObjectCallback)
Public methodStatic memberCreateObjectAsync(String, String, UIPackageCreateObjectCallback)
Public methodStatic memberCreateObjectFromURL(String)
Create a UI object.
Public methodStatic memberCreateObjectFromURL(String, UIPackageCreateObjectCallback)
Public methodStatic memberCreateObjectFromURL(String, Type)
Create a UI object.
Public methodStatic memberGetById
Return a UIPackage with a certain id.
Public methodStatic memberGetByName
Return a UIPackage with a certain name.
Public methodGetItem
Public methodGetItemAsset(String)
Public methodGetItemAsset(PackageItem)
Public methodStatic memberGetItemAsset(String, String)
Get a asset with a certain name.
Public methodStatic memberGetItemAssetByURL
Get a asset with a certain name.
Public methodGetItemByName
Public methodStatic memberGetItemByURL
Public methodGetItems
Public methodStatic memberGetItemURL
Get url of an item in package.
Public methodStatic memberGetPackages
Public methodLoadAllAssets
Public methodStatic memberNormalizeURL
将'ui://包名/组件名'转换为以内部id表达的url格式。如果传入的url本身就是内部id格式,则直接返回。 同时这个方法还带格式检测,如果传入不正确的url,会返回null。
Public methodReloadAssets
Public methodReloadAssets(AssetBundle)
Public methodStatic memberRemoveAllPackages
Public methodStatic memberRemovePackage
Remove a package. All resources in this package will be disposed.
Public methodStatic memberSetStringsSource
Set strings source.
Public methodUnloadAssets
Top
Fields
  NameDescription
Public fieldStatic memberURL_PREFIX
Top
See Also