protected override void Verify(Component comp) { AtlasLoader l = comp as AtlasLoader; foreach (AtlasLoader.AtlasPair a in l.atlases) { if (a.dst.replacement != null) { Object obj = null; switch (a.dst.replacement) { case UIAtlas inst: obj = inst.gameObject; break; case NGUIAtlas asset: obj = asset; break; } if (AssetBundlePath.inst.IsCdnAsset(obj)) { a.dst.replacement = null; EditorUtil.SetDirty(a.dst); } else { log.Log("The reference of {0} is not CDN asset".Format(AssetDatabase.GetAssetPath(obj))); } } } }
protected override void VerifyComponent(Component comp) { AtlasLoader l = comp as AtlasLoader; foreach (AtlasLoader.AtlasPair a in l.atlases) { if (a.dst.replacement != null) { if (AssetBundlePath.inst.IsCdnAsset(a.dst.replacement.gameObject)) { a.dst.replacement = null; BuildScript.SetDirty(a.dst); } else { AddErrorFormat("The reference of {0} is not CDN asset", AssetDatabase.GetAssetPath(a.dst.replacement.gameObject)); } } } }