Ejemplo n.º 1
0
 public static void CopyTexture(TexSetter s, TexLoader l)
 {
     if (l.Target.mainTexture != null && AssetBundlePath.inst.IsCdnAsset(l.Target.mainTexture))
     {
         AssetRef r = new AssetRef();
         r.cdn = true;
         r.SetPath(l.Target.mainTexture);
         s.textures.Add(r);
         EditorUtil.SetDirty(s);
     }
 }
Ejemplo n.º 2
0
 public static void SetIfCdn(UITexture tex)
 {
     if (tex == null || tex.mainTexture == null || tex.GetComponent <TexSetter>() != null)
     {
         return;
     }
     /// Add TexSetter if texture is from CDN
     if (AssetBundlePath.inst.IsCdnAsset(tex.mainTexture))
     {
         TexLoader l = tex.GetComponentEx <TexLoader>();
         TexSetter s = l.GetComponentEx <TexSetter>();
         TexSetterInspector.CopyTexture(s, l);
     }
 }