luquio

  • 2017년 11월 10일
  • 2017년 7월 10일에 가입함
  • No, it doesnt work neither.
    I just said "seems" cuz i could be doing something wrong, but was exaclty as you did. And I have no errors at all.

    The flow is:
    1- I open the panel which shows me the first "client" with its animation. That first time loads skeleton and animation with no problem.
    2- The panel has buttons to load previous/next client, after I click one of those it runs the same code to load the next client. But it does not show skeleton.

    If I go the the skeleton in the hierarchy it has the next skeleton loaded. So the thing is just that it does not show up!

    The only workaroung I found is to enable and disable the skeleton after running the skeleton code.

    The whole panel is inside a maskUI cuz it also has unity animations (slides)

  • Yes its a SkeletonGraphic, but I've tried it and seems not to work. Is there any other way or consideration? here is the whole code (original):

    string id = client.ProfilePath.ToString();
    
    ProfileSkeleton.Clear();
    ProfileSkeleton.skeletonDataAsset = SAssetBundles.LoadFromAssetBundle<SkeletonDataAsset> ("profile/" + id, id, ".asset"); 
    ProfileSkeleton.Initialize(true);
    ProfileSkeleton.AnimationState.SetAnimation(0, "animation", true);
    
  • Im replacing the skeletonDataAsset as above. It only works the first time, and the only way to make it work is to dissable and enable the gameobject. I also tried using Clear() and SetAnimationState.

    anim.skeletonDataAsset = bundle.LoadFromAssetBundle<SkeletonDataAsset> (id, ".asset");
    anim.startingAnimation = "Idle";
    anim.Initialize (true);