• Runtimes
  • Looking for help with Versioning, Atlas, and Json file

  • Изменено
Related Discussions
...

🙂 Hi guys im using PlayerSpine 4.1.10 to render game character from atlas , json , and png file to my Reactjs app . However I
cannot load things to render from 4.0.45 json and atlas file .Assets I download from your website work normally like spineboy or alien.json 4.0.31.

Please expain for me ! Tks
Here my code

import React, { useEffect } from 'react';
import { SpinePlayer } from '@esotericsoftware/spine-player';

const Character = () => {

//// Here no work
useEffect(() => {
const test = () => {
new SpinePlayer('player-container', {
jsonUrl: "/Dragon_Male.json",
atlasUrl: "/Dragon_Male.atlas",
animation: "Idle_0",
showControls: false,


        });
    }
    test()
}, [])

// useEffect(() => {
//     const test1 =  () => {
//          new SpinePlayer('bb', {
//             jsonUrl: "/alien-ess.json",
//             atlasUrl: "/alien.atlas",
//             animation: "death",
//             showControls: false,
        
//         });
//     }
//     test1()
// }, [])   // Work normally 


return <div className="spine" id="player-container">
    <div className="bb" id="bb" style={{marginTop: '50px'}}>
    </div>
</div>;

The Spine Editor major.minor version must match the Spine Runtimes major.minor version, e.g. export from Spine 4.0, use Spine Runtimes 4.0. Sometimes, exports from older editor versions may work with newer runtimes. But that's not guaranteed nor supported by us. You can always open projects save in older editor versions with newer editor versions and re-export.

So should I go back my runtimes to syn with my editor 4.0.45 from runtimes 4.1.xx or I should update both to lastest version . Please you show me how to change runtimes spine ts version

Whether you'd like to upgrade your Spine Editor version to match your current Spine Runtimes version or downgrade your Runtimes version to match your Spine Editor version is up to you; if you require features that are present in the 4.1.xx-beta versions of the Spine Editor for your project, you should upgrade your Spine Editor to match the version of the Spine Runtimes that you currently have installed (Spine Runtimes version 4.1). The link below contains more information about Spine versioning, as well as instructions on how to freeze your editor version to ensure that no conflicts occur:
Versioning - Spine User Guide: Synchronizing versions

As far as changing the spine-ts runtime version goes; if you followed the directions at this page to setup the Spine Runtimes, you can use the Git client of your choice (such as Fork, SmartGit, etc.) to checkout the branch of the Spine Runtimes you'd like to use.

i currently changed my editor to 4.1.09 beta and my runtimes is 4.1.9 from
it still render a black screen player.
Is 4.1.09 beta match with 4.1.9 runtimes . and why does it render a blackscreen


think probaly blackscreen render cause of license . How to use license in my project with ts runtimes .

The license doesn't affect the functionality of the runtime.

I don't know how we can help further. Start with the absolute simplest example. Get that working, then slowly make it more complex, step by step. You can start with one of our working examples.

You only posted the skeleton .json and .atlas file, but not the .png file(s) containing the image data of the atlas. You also haven't posted any error logs you can find in the dev tools console in your browser. Without that, we can not help.

tks for help , it was the bug of png file , somehow it doesnt work as expected when I change assests it worked