|
@@ -493,16 +493,10 @@ namespace GFGGame
|
|
|
{
|
|
|
var handle = YooAssets.LoadAssetSync<Material>(ResPathUtil.GetPrefabPath("ImageGradient", "mat"));
|
|
|
Material m = handle.AssetObject as Material;
|
|
|
-
|
|
|
Material copyM = new Material(m.shader);
|
|
|
+ handle.Release();
|
|
|
copyM.CopyPropertiesFromMaterial(m);
|
|
|
|
|
|
- AssetReleaser assetReleaser = _ui.m_loaBg2.displayObject.gameObject.GetComponent<AssetReleaser>();
|
|
|
- if (assetReleaser != null)
|
|
|
- {
|
|
|
- //必须立即销毁,不能改为Destroy代替
|
|
|
- GameObject.DestroyImmediate(assetReleaser);
|
|
|
- }
|
|
|
_ui.m_loaBg2.material = copyM;
|
|
|
_ui.m_loaBg2.position = _ui.m_loaBg.position;
|
|
|
float startY = _ui.m_loaBg2Pos.position.y;
|