ant+和http组件bug修复
This commit is contained in:
1 parent
f7b33bf491
commit
48c5b161b1
29 files changed
+3526
-2755
No files matched your search
@@ -38,13 +38,25 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
public void SetHead(string url)
|
||||
{
|
||||
if (App.TextureCache.ContainsKey(url))
|
||||
{
|
||||
Head.texture = App.TextureCache[url];
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.DisplayImageAysnc(StartCoroutine, Head, url, ImageCallBack);
|
||||
}
|
||||
Utils.DisplayImage(StartCoroutine,Head,url);
|
||||
var rect = ((RectTransform)Head.transform).rect;
|
||||
Material material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
|
||||
Head.material = material;
|
||||
}
|
||||
|
||||
private void ImageCallBack(string url)
|
||||
{
|
||||
if (!App.TextureCache.ContainsKey(url))
|
||||
App.TextureCache.Add(url, Head.texture);
|
||||
}
|
||||
public void SetDistance(double distance)
|
||||
{
|
||||
_distance = distance;
|
||||
|
||||
Reference in new issue
Block a user