the game is <priconne redive > use spine for multiple skeleton by cygame.
it make by unity and spine.
the game hero animation load common_animation(idle,run,...) (000000_CHARA_BASE.cysp) ,and AdditionAnimation (180401_DEAR.cysp),and load SkillAnimation(*****_COMMON_BATTLE.cysp)..then merge the 3 Binary File,and load ...
how to do this? our project also want use the solutions,please for help for unity.
here the code is someone write js version for webdemo with <redive > game spine resource
//assume always no more than 128 animations
var newBuffSize = generalBattleSkeletonData[baseId].byteLength - 64 + 1 +
currentClassAnimData.data.data.byteLength +
currentCharaAnimData.data.data.byteLength;
additionAnimations.forEach(function (i) {
newBuffSize += i.data.byteLength;
})
var newBuff = new Uint8Array(newBuffSize);
var offset = 0;
newBuff.set(new Uint8Array(generalBattleSkeletonData[baseId].slice(64)), 0);
offset += generalBattleSkeletonData[baseId].byteLength - 64;
newBuff[offset] = animationCount;
offset++;
newBuff.set(new Uint8Array(currentClassAnimData.data.data), offset);
offset += currentClassAnimData.data.data.byteLength;
newBuff.set(new Uint8Array(currentCharaAnimData.data.data), offset);
offset += currentCharaAnimData.data.data.byteLength;
additionAnimations.forEach(function (i) {
newBuff.set(new Uint8Array(i.data), offset);
offset += i.data.byteLength;
})
var skeletonBinary = new spine.SkeletonBinary(atlasLoader);
var skeletonData = skeletonBinary.readSkeletonData(newBuff.buffer);
var skeleton = new spine.Skeleton(skeletonData);
skeleton.setSkinByName('default');
var bounds = calculateBounds(skeleton);