Hello.
I am developing a game in Unity3D and tk2d.
I would like to use the events, but I did not find any description of how to use them. Quick code review gave nothing. Can I see a example of how to use the events?
1. sayfa (Toplam 1 sayfa)
Kea
9.5 years ago
- Kea
- Mesajlar: 18
Pharan
It hasn't been implemented yet. We'll have to wait a bit longer.
Nate yazdı:The libgdx runtime is still fluctuating. Once it has all the features I want, then I'll port it to all the other runtimes. [...]
Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
9.5 years ago
-
Pharan - Mesajlar: 5366
Kea
Thank you for answer!
OK. I will wait for implementation.
OK. I will wait for implementation.
9.5 years ago
- Kea
- Mesajlar: 18
Kea
You can tell a more accurate time frame?
9 years ago
- Kea
- Mesajlar: 18
Pharan
I think Nate is still having some internet problems. He recently moved.
Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
9 years ago
-
Pharan - Mesajlar: 5366
Nate
Yes, sorry. Planning on working on runtimes soon, can't say exactly when. 

9 years ago
-
Nate - Mesajlar: 12208
Kea
Event are not working correctly.
If you create 2 different event in a single animation is triggered only the second.
If you add the integer to event - then JSON ceases to read. (Error reading skeleton JSON file for skeleton data asset, SkeletonDataAsset.cs, line 69)
If you create 2 different event in a single animation is triggered only the second.
If you add the integer to event - then JSON ceases to read. (Error reading skeleton JSON file for skeleton data asset, SkeletonDataAsset.cs, line 69)
9 years ago
- Kea
- Mesajlar: 18
Nate
I fixed the int value, thanks. The spineboy animation has 3 events in the same animation (named "drawOrder") and I see them all fire.
9 years ago
-
Nate - Mesajlar: 12208
Kea
Install the latest version of C # and 2Dtoolkit
ERROR: Assets/Spine/spine-csharp/src/SkeletonJson.cs(215,74): error CS0103: The name `scale' does not exist in the current context
Change "scale" to "Scale"
ERROR: Assets/Spine/spine-tk2d/Assets/Spine/SkeletonAnimation.cs(59,47): error CS1061: Type `Spine.AnimationState' does not contain a definition for `Clear' and no extension method `Clear' of type `Spine.AnimationState' could be found (are you missing a using directive or an assembly reference?)
Change Clear(0) to ClearTrack(0)
Spineboy did not start,
Error reading skeleton JSON file for skeleton data asset: Spineboy SkeletonData
Unknown attachment type: boundingbox
at SpriteCollectionAttachmentLoader.NewAttachment (Spine.Skin skin, AttachmentType type, System.String name) [0x00006] in /Users/user/Documents/Monstergotchi/Assets/Spine/spine-tk2d/Assets/Spine/SpriteCollectionAttachmentLoader.cs:51
Are you testing code before you fill in the GitHub?
Please, test it.
I looked in the event spineboy.json there large gaps of more than 1 second.
My events sample:
"events": [
{ "time": 0.3333, "name": "Hit" },
{ "time": 0.5, "name": "Hit", "int": 1 },
{ "time": 0.6666, "name": "Hit", "int": 2 },
{ "time": 0.8333, "name": "Hit" },
{ "time": 1, "name": "Hit" },
{ "time": 1.1666, "name": "Hit" }
]
First event does not work.
After install new version and fixes my project started. Old animation became unstable, throw an error. One event not work.
I had to revert to the old version. I look forward to the revised version.
Just please, do not change constantly interfaces. Very difficult to update when a new version behaves absolutely the new.
ERROR: Assets/Spine/spine-csharp/src/SkeletonJson.cs(215,74): error CS0103: The name `scale' does not exist in the current context
Change "scale" to "Scale"
ERROR: Assets/Spine/spine-tk2d/Assets/Spine/SkeletonAnimation.cs(59,47): error CS1061: Type `Spine.AnimationState' does not contain a definition for `Clear' and no extension method `Clear' of type `Spine.AnimationState' could be found (are you missing a using directive or an assembly reference?)
Change Clear(0) to ClearTrack(0)
Spineboy did not start,
Error reading skeleton JSON file for skeleton data asset: Spineboy SkeletonData
Unknown attachment type: boundingbox
at SpriteCollectionAttachmentLoader.NewAttachment (Spine.Skin skin, AttachmentType type, System.String name) [0x00006] in /Users/user/Documents/Monstergotchi/Assets/Spine/spine-tk2d/Assets/Spine/SpriteCollectionAttachmentLoader.cs:51
Are you testing code before you fill in the GitHub?
Please, test it.
I looked in the event spineboy.json there large gaps of more than 1 second.
My events sample:
"events": [
{ "time": 0.3333, "name": "Hit" },
{ "time": 0.5, "name": "Hit", "int": 1 },
{ "time": 0.6666, "name": "Hit", "int": 2 },
{ "time": 0.8333, "name": "Hit" },
{ "time": 1, "name": "Hit" },
{ "time": 1.1666, "name": "Hit" }
]
First event does not work.
After install new version and fixes my project started. Old animation became unstable, throw an error. One event not work.
I had to revert to the old version. I look forward to the revised version.
Just please, do not change constantly interfaces. Very difficult to update when a new version behaves absolutely the new.
9 years ago
- Kea
- Mesajlar: 18
Nate
Sorry, I do test but there have been a lot of changes and there are many runtimes, so it is easy to get distracted and miss something. Also sorry about the API breakage, I try not to break people but sometimes the changes are necessary for the long term. The new AnimationState stuff is much better.
I fixed the compilation problems. I also fixed the first event not firing, thanks for providing your JSON. Hope you are working now!
I fixed the compilation problems. I also fixed the first event not firing, thanks for providing your JSON. Hope you are working now!
9 years ago
-
Nate - Mesajlar: 12208
Kea
Thanks, but still works properly. It's now work properly when only 1 event.
To reproduce the problem, add 1 event into jump animation:
"events": [
{"Time": 0.3666, "name": "headAttach"},
]
45 has given me a message:
0 Spine.TrackEntry: event headAttach, 0
Then he began to be issued Exception:
NullReferenceException: Object reference not set to an instance of an object
Spine.EventTimeline.Apply (Spine.Skeleton skeleton, Single lastTime, Single time, System.Collections.Generic.List `1 firedEvents, Single alpha) (at Assets / Spine / spine-csharp / src / Animation.cs: 497)
Spine.Animation.Apply (Spine.Skeleton skeleton, Single lastTime, Single time, Boolean loop, System.Collections.Generic.List `1 events) (at Assets / Spine / spine-csharp / src / Animation.cs: 73)
Spine.AnimationState.Apply (Spine.Skeleton skeleton) (at Assets / Spine / spine-csharp / src / AnimationState.cs: 110)
SkeletonAnimation.UpdateSkeleton () (at Assets/Spine/spine-tk2d/Assets/Spine/SkeletonAnimation.cs: 70)
SkeletonComponent.Update () (at Assets/Spine/spine-tk2d/Assets/Spine/SkeletonComponent.cs: 108)
If 2 or more events everything works ok.
To reproduce the problem, add 1 event into jump animation:
"events": [
{"Time": 0.3666, "name": "headAttach"},
]
45 has given me a message:
0 Spine.TrackEntry: event headAttach, 0
Then he began to be issued Exception:
NullReferenceException: Object reference not set to an instance of an object
Spine.EventTimeline.Apply (Spine.Skeleton skeleton, Single lastTime, Single time, System.Collections.Generic.List `1 firedEvents, Single alpha) (at Assets / Spine / spine-csharp / src / Animation.cs: 497)
Spine.Animation.Apply (Spine.Skeleton skeleton, Single lastTime, Single time, Boolean loop, System.Collections.Generic.List `1 events) (at Assets / Spine / spine-csharp / src / Animation.cs: 73)
Spine.AnimationState.Apply (Spine.Skeleton skeleton) (at Assets / Spine / spine-csharp / src / AnimationState.cs: 110)
SkeletonAnimation.UpdateSkeleton () (at Assets/Spine/spine-tk2d/Assets/Spine/SkeletonAnimation.cs: 70)
SkeletonComponent.Update () (at Assets/Spine/spine-tk2d/Assets/Spine/SkeletonComponent.cs: 108)
If 2 or more events everything works ok.
9 years ago
- Kea
- Mesajlar: 18
Nate
It works for me. Make sure you use "time" and not "Time" and that your spine-csharp is up to date.
9 years ago
-
Nate - Mesajlar: 12208
Kea
You are right. I'm not using the latest version of Spine-sharp.
Sorry.
Sorry.
9 years ago
- Kea
- Mesajlar: 18
Nate
I made sure I have the latest spine-tk2d AND spine-csharp, added your spineboy.json.txt, ran it with TK2D, clicked on spineboy to make him jump, and it worked:


9 years ago
-
Nate - Mesajlar: 12208
Nate
Oops, just saw your latest post. No problem, this is the kind of thing that caused all the compilation errors in your previous post. It is hard to keep track of 18+ runtimes! 

9 years ago
-
Nate - Mesajlar: 12208
Kea
Yes, i am sorry, thank you for help.
There is another issue (not about events). Previously, when I was doing
skeleton.animationName = "dead";
skeleton.loop = false;
The animation is no longer playable. Now the animation is played repeatedly in all my characters.
Just by removing the method LateUpdate () in SpineBoy, which includes another animation after "jump" animation, you can see that the animation loop in which the property is played repeatedly.
Is this is a bug, or have some other way to use property loop?
I have now killed the monsters do not lie, but always stand up and die again.
There is another issue (not about events). Previously, when I was doing
skeleton.animationName = "dead";
skeleton.loop = false;
The animation is no longer playable. Now the animation is played repeatedly in all my characters.
Just by removing the method LateUpdate () in SpineBoy, which includes another animation after "jump" animation, you can see that the animation loop in which the property is played repeatedly.
Is this is a bug, or have some other way to use property loop?
I have now killed the monsters do not lie, but always stand up and die again.

9 years ago
- Kea
- Mesajlar: 18
Nate
Fixed in git, thanks. Had to change the way the animationName is set.
9 years ago
-
Nate - Mesajlar: 12208
Kea
After fix AddAnimation work another (or don't work).
And now looped animations is not playing again. Play only once, you can test it SpineBoy.
And now looped animations is not playing again. Play only once, you can test it SpineBoy.
9 years ago
- Kea
- Mesajlar: 18
Louis
I too am experiencing animation looping issues with the latest c# and tk2d runtimes
9 years ago
- Louis
- Mesajlar: 11
Nate
There were a few problems and the Spineboy.cs script was overwriting values set by the inspector. Things should work now. If not, please let me know.
9 years ago
-
Nate - Mesajlar: 12208
Kea
All work good, thank you!
9 years ago
- Kea
- Mesajlar: 18
Mark topic unread
• 1. sayfa (Toplam 1 sayfa)
Dön Runtimes
- Tüm zamanlar UTC