C# Class FairyGUI.UIPackage

ファイルを表示 Open project: fairygui/FairyGUI-unity Class Usage Examples

Public Methods

Method Description
AddPackage ( AssetBundle bundle ) : UIPackage

Add a UI package from assetbundle.

AddPackage ( AssetBundle desc, AssetBundle res ) : UIPackage

Add a UI package from two assetbundles. desc and res can be same.

AddPackage ( AssetBundle desc, AssetBundle res, string mainAssetName ) : UIPackage

Add a UI package from two assetbundles with a optional main asset name.

AddPackage ( string descFilePath ) : UIPackage

Add a UI package from a path relative to Unity Resources path.

AddPackage ( string desc, AssetBundle res ) : UIPackage

Add a UI package from a description text and a assetbundle.

AddPackage ( string desc, AssetBundle res, string mainAssetName ) : UIPackage

Add a UI package from a description text and a assetbundle, with a optional main asset name.

AddPackage ( string assetPath, UIPackage loadFunc ) : UIPackage
CreateObject ( string resName ) : GObject

CreateObject ( string resName, System userClass ) : GObject

CreateObject ( string pkgName, string resName ) : GObject

Create a UI object.

CreateObject ( string pkgName, string resName, System userClass ) : GObject

Create a UI object.

CreateObjectAsync ( string resName, CreateObjectCallback callback ) : void
CreateObjectAsync ( string pkgName, string resName, CreateObjectCallback callback ) : void
CreateObjectFromURL ( string url ) : GObject

Create a UI object.

CreateObjectFromURL ( string url, System userClass ) : GObject

Create a UI object.

CreateObjectFromURL ( string url, CreateObjectCallback callback ) : void
GetById ( string id ) : UIPackage

Return a UIPackage with a certain id.

GetByName ( string name ) : UIPackage

Return a UIPackage with a certain name.

GetItem ( string itemId ) : PackageItem
GetItemAsset ( PackageItem item ) : object
GetItemAsset ( string resName ) : object

GetItemAsset ( string pkgName, string resName ) : object

Get a asset with a certain name.

GetItemAssetByURL ( string url ) : object

Get a asset with a certain name.

GetItemByName ( string itemName ) : PackageItem
GetItemByURL ( string url ) : PackageItem
GetItemURL ( string pkgName, string resName ) : string

Get url of an item in package.

GetItems ( ) : List
GetPackages ( ) : List

GetPixelHitTestData ( string itemId ) : FairyGUI.PixelHitTestData
RemoveAllPackages ( ) : void

RemoveAllPackages ( bool allowDestroyAssets ) : void

RemovePackage ( string packageIdOrName ) : void

Remove a package. All resources in this package will be disposed.

RemovePackage ( string packageIdOrName, bool allowDestroyingAssets ) : void

Remove a package. All resources in this package will be disposed.

SetStringsSource ( XML source ) : void

Set strings source.

UIPackage ( ) : System

Private Methods

Method Description
CollectComponentChildren ( PackageItem item, List list ) : void

收集创建目标对象所需的所有类型信息

ComparePackageItem ( PackageItem p1, PackageItem p2 ) : int
Create ( string desc, AssetBundle res, string mainAssetName ) : void
CreateObject ( PackageItem item, System userClass ) : GObject
CreateObjectAsync ( PackageItem item, CreateObjectCallback callback ) : void
CreateSpriteTexture ( AtlasSprite sprite ) : NTexture
DecodeDesc ( string source ) : void
Dispose ( bool allowDestroyingAssets ) : void
LoadAtlas ( PackageItem item ) : void
LoadBinary ( string fileName ) : byte[]
LoadComponent ( PackageItem item ) : void
LoadComponentChildren ( PackageItem item ) : void
LoadFont ( PackageItem item ) : void
LoadMovieClip ( PackageItem item ) : void
LoadPackage ( ) : void
LoadSound ( PackageItem item ) : void
LoadString ( string fileName ) : string
TranslateComponent ( PackageItem item ) : void
_CreateObjectAsync ( PackageItem item, CreateObjectCallback callback ) : IEnumerator

Method Details

AddPackage() public static method

Add a UI package from assetbundle.
public static AddPackage ( AssetBundle bundle ) : UIPackage
bundle UnityEngine.AssetBundle A assetbundle.
return UIPackage

AddPackage() public static method

Add a UI package from two assetbundles. desc and res can be same.
public static AddPackage ( AssetBundle desc, AssetBundle res ) : UIPackage
desc UnityEngine.AssetBundle A assetbunble contains description file.
res UnityEngine.AssetBundle A assetbundle contains resources.
return UIPackage

AddPackage() public static method

Add a UI package from two assetbundles with a optional main asset name.
public static AddPackage ( AssetBundle desc, AssetBundle res, string mainAssetName ) : UIPackage
desc UnityEngine.AssetBundle A assetbunble contains description file.
res UnityEngine.AssetBundle A assetbundle contains resources.
mainAssetName string Main asset name.
return UIPackage

AddPackage() public static method

Add a UI package from a path relative to Unity Resources path.
public static AddPackage ( string descFilePath ) : UIPackage
descFilePath string Path relative to Unity Resources path.
return UIPackage

AddPackage() public static method

Add a UI package from a description text and a assetbundle.
public static AddPackage ( string desc, AssetBundle res ) : UIPackage
desc string Description text.
res UnityEngine.AssetBundle A assetbundle contains resources.
return UIPackage

AddPackage() public static method

Add a UI package from a description text and a assetbundle, with a optional main asset name.
public static AddPackage ( string desc, AssetBundle res, string mainAssetName ) : UIPackage
desc string Description text.
res UnityEngine.AssetBundle A assetbundle contains resources.
mainAssetName string Main asset name.
return UIPackage

AddPackage() public static method

public static AddPackage ( string assetPath, UIPackage loadFunc ) : UIPackage
assetPath string
loadFunc UIPackage
return UIPackage

CreateObject() public method

public CreateObject ( string resName ) : GObject
resName string
return GObject

CreateObject() public method

public CreateObject ( string resName, System userClass ) : GObject
resName string
userClass System
return GObject

CreateObject() public static method

Create a UI object.
public static CreateObject ( string pkgName, string resName ) : GObject
pkgName string Package name.
resName string Resource name.
return GObject

CreateObject() public static method

Create a UI object.
public static CreateObject ( string pkgName, string resName, System userClass ) : GObject
pkgName string Package name.
resName string Resource name.
userClass System Custom implementation of this object.
return GObject

CreateObjectAsync() public method

public CreateObjectAsync ( string resName, CreateObjectCallback callback ) : void
resName string
callback CreateObjectCallback
return void

CreateObjectAsync() public static method

public static CreateObjectAsync ( string pkgName, string resName, CreateObjectCallback callback ) : void
pkgName string
resName string
callback CreateObjectCallback
return void

CreateObjectFromURL() public static method

Create a UI object.
public static CreateObjectFromURL ( string url ) : GObject
url string Resource url.
return GObject

CreateObjectFromURL() public static method

Create a UI object.
public static CreateObjectFromURL ( string url, System userClass ) : GObject
url string Resource url.
userClass System Custom implementation of this object.
return GObject

CreateObjectFromURL() public static method

public static CreateObjectFromURL ( string url, CreateObjectCallback callback ) : void
url string
callback CreateObjectCallback
return void

GetById() public static method

Return a UIPackage with a certain id.
public static GetById ( string id ) : UIPackage
id string ID of the package.
return UIPackage

GetByName() public static method

Return a UIPackage with a certain name.
public static GetByName ( string name ) : UIPackage
name string Name of the package.
return UIPackage

GetItem() public method

public GetItem ( string itemId ) : PackageItem
itemId string
return PackageItem

GetItemAsset() public method

public GetItemAsset ( PackageItem item ) : object
item PackageItem
return object

GetItemAsset() public method

public GetItemAsset ( string resName ) : object
resName string
return object

GetItemAsset() public static method

Get a asset with a certain name.
public static GetItemAsset ( string pkgName, string resName ) : object
pkgName string Package name.
resName string Resource name.
return object

GetItemAssetByURL() public static method

Get a asset with a certain name.
public static GetItemAssetByURL ( string url ) : object
url string Resource url.
return object

GetItemByName() public method

public GetItemByName ( string itemName ) : PackageItem
itemName string
return PackageItem

GetItemByURL() public static method

public static GetItemByURL ( string url ) : PackageItem
url string
return PackageItem

GetItemURL() public static method

Get url of an item in package.
public static GetItemURL ( string pkgName, string resName ) : string
pkgName string Package name.
resName string Resource name.
return string

GetItems() public method

public GetItems ( ) : List
return List

GetPackages() public static method

public static GetPackages ( ) : List
return List

GetPixelHitTestData() public method

public GetPixelHitTestData ( string itemId ) : FairyGUI.PixelHitTestData
itemId string
return FairyGUI.PixelHitTestData

RemoveAllPackages() public static method

public static RemoveAllPackages ( ) : void
return void

RemoveAllPackages() public static method

public static RemoveAllPackages ( bool allowDestroyAssets ) : void
allowDestroyAssets bool
return void

RemovePackage() public static method

Remove a package. All resources in this package will be disposed.
public static RemovePackage ( string packageIdOrName ) : void
packageIdOrName string
return void

RemovePackage() public static method

Remove a package. All resources in this package will be disposed.
public static RemovePackage ( string packageIdOrName, bool allowDestroyingAssets ) : void
packageIdOrName string
allowDestroyingAssets bool
return void

SetStringsSource() public static method

Set strings source.
public static SetStringsSource ( XML source ) : void
source XML
return void

UIPackage() public method

public UIPackage ( ) : System
return System