private void PreSetImage() { if (string.IsNullOrEmpty(currentPath)) { return; } if (AtlasConfig.kUsingCopyTexture) { m_Atlas.SetTexture(currentPath, texture, OnGetImageCallBack); } else { m_Atlas.SetTexture(currentPath, texture, OnGetMaterialCallBack); } //此时可以卸载自己的引用计数 }
private void SetImage() { defaultSprite = sprite; if (string.IsNullOrEmpty(currentPath)) { return; } if (AtlasConfig.kUsingCopyTexture)//Sprite 只支持using copytexture { m_Atlas.SetTexture(currentPath, mainTexture, OnGetImageCallBack); } else { gameObject.SetActiveVirtual(false);//由于RT的方式无法转化为Sprite或者比较麻烦,就没有实现 } //此时可以卸载自己的引用计数 }