cocos-pnp icon indicating copy to clipboard operation
cocos-pnp copied to clipboard

Unity build for 382: Invalid url

Open Kodedyukh opened this issue 1 year ago • 2 comments

Hello! I have problems compiling a 3.8.2 Cocos build with playable-ads-adapter 1.3.9 to the Unity ads network. The core problem is that in the Unity testing app an invalid url is generated. See a screenshot below (screenshot is generated with JS log option turned on, in the the advanced tools section) AdTesting

At the same time, everything works fine when I run the build on localhost (python simpleHttp) When I downgrade to Cocos 360 everything works fine in the Unity test app Is there any way to fix this problem for 382 Cocos build?

Some additional thoughts: Looks like the invalid url is generated when the build tries to create script out of the file in path “/web-mobile/cocos-js/meshopt_decoder.wasm-43855155.js” And it seems like since Cocos 360 doesn’t generate this file everything goes fine in it

Kodedyukh avatar Jun 04 '24 08:06 Kodedyukh

I have a similair issue. cocos 383 single index.html does not work in the Unity Ad Testing app. It works elsewhere perfectly, even without any server - single index.html is able to load its resources from itself. But Unity Ad Testing app refuses to show my ad. Will try 360 now. PS. Yes, with 360 works. @Kodedyukh thanks for this point!

PS2. Unfortunately, it works on android only. with ios it fails and shows some weird "downloads" labels at random places.

Upd 3. It started working on IOS as well, after replacing .webp images with .png; Still not working in End-Card mode...

Does anybody know how to postpone the start of the game (made with cocos-3.6.0) until video ad is ended?

Papirosnik avatar Jun 06 '24 06:06 Papirosnik

@Papirosnik Maybe using cc.game.pause() can help, before isViewable became true inside mraid's "viewableChange" event's callback

Kodedyukh avatar Jul 05 '24 09:07 Kodedyukh

With the last updates Cocos Creator 3.8.4 Unity build works out of the box

Kodedyukh avatar Nov 12 '24 10:11 Kodedyukh