CTextureResourceMgr¶
You need to add this script by AddComponent in “Awake” method of CMainSystem.
This is intended to manage the texture resources .
It is a container of CTextureResource.
The CTextureResource is downloaded or loaded from resources. This manager returns the cache if it was already loaded.
This window system also load a texture via this manager .
The resource creation method please refer to here .
Note
To read via asset bundle , you need to register the CAssetBundleMgr .
-
class CTextureResourceMgr
¶ -
CTextureResource
reference
(UInt32 id)¶ - Param uint id
Asset Bundle ID
Refers to a texture resource. If not cached, download it.
Returns CTextureResource if the texture resource exists even if it has not already been downloaded.
The returned CTextureResource is being downloaded can be determined by CTextureResource.isLoaded.
if it returns true,the asset is already loaded.
If it cannot be downloaded as an asset bundle, try to import it as resource data.
If none exists, null is returned.
-
static CTextureResourceMgr
Instance
{ get; }¶ It has an instance of a manager
-
CTextureResource
-
class CTextureResource
¶ This can be cast to the Material.
-
Material
get
()¶ You get the Material .
-
CSpriteDataOne[]
spriteData
{ get; }¶ You get the sprite data .
Parts of UV information, patch information , and color information are stored.
-
Material
-
class CSpriteDataOne
¶ Parts of UV information, patch information , and color information are stored.
-
WinColor
m_color
{ get; }¶
-
e_Patch
m_ePatch
{ get; }¶
public enum e_Patch { None, //patch none H3, //3 patch in a horizontal direction V3, //3 patch in the vertical direction HV9, //9 patch };
-
WinColor