Hello Guest

Author Topic: Animation Triggers not showing up  (Read 6652 times)

Lurlock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Animation Triggers not showing up
« on: April 26, 2013, 09:11:10 pm »
I have a SpriteAnimation with several clips set up.  I created some Triggers just to test it (by hitting the Trigger button on the side).  The Triggers are there, and they work, but they don't show up on the Trigger bar, so I can't select them.  Thus I can't edit, move, or most importantly delete the Triggers I've already placed.  I'm using 1.92 final + patch 1, on Unity 3.5.7f6, Windows 7 in case that matters.  I've tried quitting and restarting the program and everything else I can think of, including recreating the SpriteAnimation from scratch - the Triggers never show up.  This is my first time using 2DTK, so I don't know what the triggers are supposed to look like, but I can say with certainty that there is nothing there in the Trigger bar, but there are definitely Triggers there, because the code I wrote for the animationEventDelegate does fire (several times - which is why I want to get rid of some of these).

Addendum: Okay, apparently, I can click on the Triggers in the Trigger bar, but I still can't see them, so it's really hard to find them in order to click.  So let's call this a bug report, rather than a what-am-I-doing-wrong post.
« Last Edit: April 26, 2013, 09:30:25 pm by Lurlock »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Animation Triggers not showing up
« Reply #1 on: April 27, 2013, 10:07:18 am »
This sounds like your skin is broken. Did you move the project / use version control / dropbox without turning on .meta files in Unity? Thing is, if this is broken, it implies other things may be broken too.

Try importing into a new project - it should work fine there. Make sure it works fine - your download may be corrupted. I've had Unity import corrupted packages without warning before.
 
Once you verify the above,
To fix it in your existing project, try this:
1. Close all 2D Toolkit windows, create a new scene.
2. Delete TK2DROOT/tk2d/Editor/Skin
3. Import 2D Toolkit again, and just import the skin folder.

Restart Unity and try using the editor again.

Lurlock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Animation Triggers not showing up
« Reply #2 on: April 27, 2013, 11:40:44 pm »
Okay, so I guess I am doing something wrong - I just put the entire 2DTKROOT folder inside my project's Assets folder.  (It's a brand new project created just to test 2DTK and figure out how it works.  Our main project was built using Orthello, which we're not satisfied with for performance reasons, but I need to get this working in a simpler demo before we can start refactoring the real project.)  The menus and everything showed up, and I was able to use the tools and everything works (with the exception of invisible Trigger markers), so I figured that was the way to do it.  I've tried importing just the skin files, but it doesn't seem to help.  I'll admit, I'm a bit new to using plug-ins for Unity - I've mostly just used it straight without any 3rd-party stuff.  Is there a FAQ/tutorial somewhere for how to properly import and set up a project?  All the ones I saw assumed you'd done that part already.  Seems like that should be step 1 in the docs.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Animation Triggers not showing up
« Reply #3 on: April 28, 2013, 01:05:45 am »
How did you put the TK2DROOT folder into assets? Did you just import from the asset store and not do anything beyond that?

Lurlock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Animation Triggers not showing up
« Reply #4 on: April 28, 2013, 11:27:41 pm »
The main project was set up by my supervisor - I got it via DropBox, and copied the 2DTKROOT folder from that into the test project.  I'm not sure how he set it up, I'll have to wait until Tuesday to ask him.  Though it'd be hard to test, since he hasn't actually done any work yet with 2DTK, beyond just purchasing and installing it.  (Actually implementing it is my job.)  Not sure if it matters, but I think he has UnityPro, while I have just the free version for now.  I tried following your instructions, but I'm not sure what you mean by "Import 2D Toolkit" in step 3.  Can that ONLY be done via the Asset Store?  Because if that's the case, that sounds like I'd have to work from his computer, which is not going to happen.  (Of course he's the one who made the purchase, since he's the one with the money.  Was it a mistake for him to do so from his computer instead of mine, even though we're both going to ultimately need the code?)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Animation Triggers not showing up
« Reply #5 on: April 28, 2013, 11:39:00 pm »
The issue is likely that the first dropbox drop was done without meta files turned on. This must be fixed before you can do anything.

Lurlock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Animation Triggers not showing up
« Reply #6 on: April 30, 2013, 09:09:29 pm »
Okay, so I finally got my sup to re-upload the project to Dropbox with meta files turned on.  It seems to have fixed the problem, though it completely broke my test scene - I had to recreate both my SpriteCollection and SpriteAnimation from scratch to get anything to work at all.  (Fortunately this was just a test scene, and only had one of each.  This would have been a major setback if I'd set more of them up.)  I also had to go in and delete the tk2d_demo folder, since it was automatically adding all the sample sprites to my project, which I think messed up the GUIDs, and I think that may be why everything broke.

Might be nice to add something to the FAQ explaining the proper way of doing this (along with how exactly to turn on meta files, which I eventually figured out, but not without a good deal of Googling), so that others won't have to go through all that.  It's probably not an uncommon issue in any Unity shop with more than one person.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Animation Triggers not showing up
« Reply #7 on: April 30, 2013, 09:46:22 pm »
I've kinda refrained from adding normal Unity best practices into the FAQs, simply because its not specific to the product. Thing is though, a LOT of people make the same mistake, and the docs aren't a good place for something like this, as more often than not, people have already broken it by the time they get here...

I'm thinking of adding a popup window show up every time you update 2D Toolkit (just once) to show you the changes in this new version, also any notes, eg. I might have to move the 2D Toolkit menu in the next version, and I don't want everyone to be stuck wondering where its gone.

On a brand new install, I could have a button which says "Getting started with 2D Toolkit and Unity" and have that link to some docs. Any thoughts?

Lurlock

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Animation Triggers not showing up
« Reply #8 on: May 01, 2013, 02:13:16 am »
Yeah, if you bury in the docs, it's no good because as you say, people have already broken it by then.  With any 3rd party library (Unity or otherwise), installation always seems to be the hardest part for me at least.  That's why I think it should be the FIRST thing in the docs, even before the "Terminology and introduction" section.  Learning the terminology isn't very useful if you've got a broken install, so installation instructions should be the very first thing you see.  A "Getting started" button on install isn't a bad idea either, but people tend to skip over things like that, just like EULA's that nobody ever reads.  If it's easily accessible and clearly marked in the docs, before anything else, maybe even in bold-face, red text with a big "READ THIS FIRST" note if you want to be extra careful, then people might be more likely to see it.  (And of course, the "Getting started" button could just link directly to that page in the docs.  It's just my opinion, though.  I'm not telling you how best to do it, just saying that if a lot of people are making this mistake as you say, it's probably worth documenting it so you don't have to keep answering the same question over and over.

Anyhow, thanks for helping out.  Already liking what I see so far.  Only problem now is how to translate the existing (fairly sizable) code-base to use this system without breaking everything, but that's what they're paying me for...