【super-html】🧙 使用魔法 将构建的Web项目打包成一个html

加你qq了。是用这个网站?具体哪个环节黑屏的?ironSource Playable Test Tool

我做了个可玩素材 在浏览器中一切正常,但是上传Unity ads 广告后台之后 用 ad testing app 测试… 发现UI显示不出来了 :sob: 大佬有遇到过类似问题没

你好,是使用super html打包的么?super html支持 VConsole ,可以看看有什么报错,可以加我微信交流 :mage:

是使用的super html打的包, 但是我目前比较怀疑是cocos 的UI机制, unity playable ads 的广告要先播放一个视频 然后后台加载H5游戏 , 后台加载的时候没有显示,所以我有点怀疑是加载的时候cocos 给画布设置了0x0的大小, 导致显示不出来, 但是我找不到证据. 我先用 VConsole 试试看. 我上班不用微信, 大佬 加我QQ吧 1191481036

应该是可以解决的,估计市面上很大一部分试玩都是creator做的,我们也有发Unity,没发现有这个问题。对了,有换别的手机试试吗?加你好友了,私聊

记录下最后问题是怎么处理的,接Unity平台的可以看下,需要先加载平台的sdk

super html有对资源进行zip压缩的选项,勾起来会进行压缩,下个版本会更新智能压缩的功能,根据配置阈值进行压缩
对项目的音效,图片进行压缩。如果超过大小,就只能坎资源做取舍。

@magician-f thanks for the great plugin, I’ve been waiting for this for a long time! When I saw it, I immediately bought it.

Everything works fine, but the plugin has a problem saving the font. The font file is not packaged in index.html. As a result, the basic font is displayed. You can see it in my screenshots.

Cocos project:

Do you have instructions on how to solve this problem?

Sorry, the font failed to load is a “super html” bug, a new version is expected to be released this week to fix this bug together. I’ll let you know when there’s progress

Thank you, I will be waiting for the updated version!

The new version v1.1.0 has been released, please use this version to solve font problems :grinning:

1赞

Thank you, the fonts work great. But when I tested version 1.1.0 I found a new problem. Index.html does not compile if the obfuscation function is disabled.

Thanks a lot for your feedback.
I’m very, very sorry about that. :rofl:
This bug has been found and fixed, and the v1.1.1 version is submitted to the store, and it can also be downloaded in the store after the review.
Please manually overwrite this path with the contents of this archive
…/extensions/super-html-3x/static
index.zip (498.8 KB)

1赞

mark 蹲个打折入手

@magician-f Thanks for the great plugin!
In my game, I use third-party SDKs that connect via url.
As in the example below:


When I build via superhtml these SDKs stop working and show the following error:
CocosScreen2

Do you know how to solve this problem?

Thank you for waiting, please try to follow the steps below:

  1. Please see …/custom_script/34x/custom-34x.js
const _createElement = document.createElement;

changed to

const _createElement = document.createElement;
document._my_createElement = _createElement
  1. Then replace your code, document.createElement with document._my_createElement

Thank you for your help!
But now I have this error:

Do you have instructions on how to solve this problem?


Your own remote loaded code, whether document._my_createElement is used

1赞

打完包后报错 请问是什么原因 cc is not defined!image

看着像是引擎没打包进去,方便加微信沟通么?
微信号:magician-f8