A UI Package contains a description file and some texture,sound assets.
Inheritance HierarchySystem.Object
FairyGUI.UIPackage
Namespace:
FairyGUI
Assembly:
FairyGUI (in FairyGUI.dll) Version: 1.0.0.0 (1.0.0.0)
SyntaxThe UIPackage type exposes the following members.
Constructors
| Name | Description |
---|
 | UIPackage | Initializes a new instance of the UIPackage class |
Top
Properties
| Name | Description |
---|
 | assetPath |
The path relative to the resources folder.
|
 | customId |
Set a custom id for package, then you can use it in GetById.
|
 | id |
Package id. It is generated by the Editor, or set by customId.
|
 | name |
Package name.
|
 | resBundle | |
Top
Methods
| Name | Description |
---|
  | AddPackage(String) |
Add a UI package from a path relative to Unity Resources path.
|
  | AddPackage(AssetBundle) |
Add a UI package from assetbundle.
|
  | AddPackage(String, UIPackage.LoadResource) |
使用自定义的加载方式载入一个包。
|
  | AddPackage(AssetBundle, AssetBundle) |
Add a UI package from two assetbundles. desc and res can be same.
|
  | AddPackage(Byte[], String, UIPackage.LoadResource) |
使用自定义的加载方式载入一个包。
|
  | AddPackage(AssetBundle, AssetBundle, String) |
Add a UI package from two assetbundles with a optional main asset name.
|
 | CreateObject(String) | |
  | CreateObject(String, String) |
Create a UI object.
|
 | CreateObject(String, Type) | |
  | CreateObject(String, String, Type) |
Create a UI object.
|
 | CreateObjectAsync(String, UIPackage.CreateObjectCallback) | |
  | CreateObjectAsync(String, String, UIPackage.CreateObjectCallback) | |
  | CreateObjectFromURL(String) |
Create a UI object.
|
  | CreateObjectFromURL(String, UIPackage.CreateObjectCallback) | |
  | CreateObjectFromURL(String, Type) |
Create a UI object.
|
  | GetById |
Return a UIPackage with a certain id.
|
  | GetByName |
Return a UIPackage with a certain name.
|
 | GetItem | |
 | GetItemAsset(String) | |
 | GetItemAsset(PackageItem) | |
  | GetItemAsset(String, String) |
Get a asset with a certain name.
|
  | GetItemAssetByURL |
Get a asset with a certain name.
|
 | GetItemByName | |
  | GetItemByURL | |
 | GetItems | |
  | GetItemURL |
Get url of an item in package.
|
  | GetPackages | |
 | LoadAllAssets | |
  | NormalizeURL |
将'ui://包名/组件名'转换为以内部id表达的url格式。如果传入的url本身就是内部id格式,则直接返回。
同时这个方法还带格式检测,如果传入不正确的url,会返回null。
|
 | ReloadAssets() | |
 | ReloadAssets(AssetBundle) | |
  | RemoveAllPackages | |
  | RemovePackage |
Remove a package. All resources in this package will be disposed.
|
  | SetStringsSource |
Set strings source.
|
 | UnloadAssets | |
Top
Fields
See Also