mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update Utils.cs
This commit is contained in:
@@ -167,7 +167,7 @@ namespace TEngine
|
|||||||
int splitIndex = path.LastIndexOf('#');
|
int splitIndex = path.LastIndexOf('#');
|
||||||
string resPath;
|
string resPath;
|
||||||
bool bWithSubAssets;
|
bool bWithSubAssets;
|
||||||
string subAssetName;
|
string subAssetName = string.Empty;
|
||||||
if (splitIndex > 0)
|
if (splitIndex > 0)
|
||||||
{
|
{
|
||||||
resPath = path.Substring(0, splitIndex);
|
resPath = path.Substring(0, splitIndex);
|
||||||
@@ -201,10 +201,9 @@ namespace TEngine
|
|||||||
|
|
||||||
if (bWithSubAssets)
|
if (bWithSubAssets)
|
||||||
{
|
{
|
||||||
string name = path.Split('.')[0];
|
if (asset[subAssetName] != null)
|
||||||
if (asset[name] != null)
|
|
||||||
{
|
{
|
||||||
image.sprite = asset[name] as Sprite;
|
image.sprite = asset[subAssetName] as Sprite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user