mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update Utils.cs
Update Utils.cs
This commit is contained in:
@@ -198,7 +198,19 @@ namespace TEngine
|
||||
if (component.GetType() == typeof(Image))
|
||||
{
|
||||
var image = (Image)component;
|
||||
image.sprite = asset.AssetObject as Sprite;
|
||||
|
||||
if (bWithSubAssets)
|
||||
{
|
||||
string name = path.Split('.')[0];
|
||||
if (asset[name] != null)
|
||||
{
|
||||
image.sprite = asset[name] as Sprite;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
image.sprite = asset.AssetObject as Sprite;
|
||||
}
|
||||
}
|
||||
else if (component as SpriteRenderer != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user