Version 3.6.2 Spine Custom Material error

Materials that work well in the web version do not work in Android. There’s a problem with this. Looking at logcat, custom shader is not even compiled.

You can try merging this pr to see if it can be fixed.
After modifying the engine code, click this button to recompile the engine.
image
After a successful recompile, execute npm run bundle-adapter in the engine directory.

Okay. I’ll give it a try.

It works perfectly. thank you very much. Thumbs up!

When I update the engine as you said, the following phrase appears. Is this okay? In fact, after this update, some file files are crashing… I really need CC 3.6.3 version desperately.

(1) Can not declare sp.Skeleton._updateBuiltinMaterial, it is already defined in the prototype of sp.Skeleton
(2) Can not declare sp.Skeleton.updateMaterial, it is already defined in the prototype of sp.Skeleton
(3) (/Applications/CocosCreator/Creator/3.6.2/CocosCreator.app/Contents/Resources/resources/3d/engine/native/cocos/bindings/jswrapper/v8/ScriptEngine.cpp, 1148): _updateInstancedAttributes is not a function: undefined
2023-01-08 01:14:57.442 11920-11977/com.chamelio.magickapuzzle E/Cocos: 01:14:57 [ERROR]: [SE_ERROR]

Can you provide a simple demo?

ok wait a minute

It’s not easy to reproduce with a demo.

First of all, our game is a vertical room making game. We have so many layers.
In the current game, if the image is not inherent when loading the layer, it uses a method of dynamically downloading and then adding it.

this way
(1) When the room is active
(2) If the image is embedded, immediately addchild
(3) Otherwise, after downloading the resource (spine file) from the server, when the download is complete, addchild (asynchronous method)

But where the problem appeared was that we didn’t represent all the rooms. So, for the purpose of resource management, if you scroll down the screen and a room gets out of sight, you are deactivating that room.

However, if a room is deactivated before all resources are received from the server, but the resources in that room are not completely down, an error occurs.

We solved the error by eliminating the inactive method and adjusting the alpha value.

1 Like