Results 1 to 12 of 12

Thread: Asset Bundle Animation

  1. #1
    Join Date
    May 2016
    Posts
    1,072

    Asset Bundle Animation

    I am hoping that I can ask someone to write up a quick, bullet point style summary of how to add a trigger animation to Unity.

    So far, I've managed to create an animation attached to an object, I can watch it play in unity, but for some reason I can't add it to the TTS Asset Bundle Effects under Animation. I can't seem to manage to add ANY animation. I'm officially out of things to try.

  2. #2
    Make sure your setting you animations to legacy if your using the TTS example script.

    Its a sod to find at first if you don't know where to look.
    You need to switch the Unity inspector panel to debug to reveal the necessary checkbox when you have your animation selected.

    Click on the 3 little parallel bars in the very top right of the Inspector panel to switch to and from debug mode.

    If your still struggling after that I'll talk you through the process in full

    If you can take a picture of the inspector panel at the furthest point you reached that would also help us in narrowing down the issue.
    Last edited by Lucky seven; 11-18-2016 at 10:18 PM.

  3. #3
    Join Date
    May 2016
    Posts
    1,072
    I enabled the legacy checkbox per the instructions, still unable to add the animation (ButtonPressed) to the animation slot for script (Animation Component)

    The goal is to make the red button drop down and raise back up. What I've done here is color the 2 bits (modeled elsewhere). I created the Animation, added the Animator to the red object, made the animation follow the correct motion. Now I am unable to apply that as a trigger effect. No idea where I have gone wrong, only that I have.

    [url]http://screencast.com/t/4bQLlhmhCgZV[/url]

  4. #4
    I think I see your problem . . .

    You need to add an "Animation" Component as well as the "Animator" component you've included.

    This "Animation" Component will hold the Animation(s)" that the Animator will draw from.

    Here's an example of an animation for reference.

    [URL=http://s1351.photobucket.com/user/Scrapbinner/media/Table%20top%20simulator/Animation-Set-up_zpskopfchjr.png.html][/URL]

  5. #5
    Join Date
    May 2016
    Posts
    1,072
    Thank you for your help. For those who may come here later looking for answers, here is what I did:

    On the object I wanted to animate, I used Add Component in the heirachy to add both an "animation" and an "animator". I then created a new animation (same place you create new materials) and drag/dropped it into the object to animate. I proceeded to create the animation in the animation window (may have to switch to it up in the window button) and made a timeline where the button went down and back up. Once that was done, I had to put the animation I created from the Assets panel over into the animation slot in the heirachy for the object. Then when I selected the object and hit play up top, it showed my animation.

    Then I added the TTS Asset Bundle Effect script, went to animation component, clicked the little circle to the right of it and selected the object that was to be animated. Then for animation name I entered the exact name of that animation.

    Then I bundled the asset bundle normally and it worked. Hoozah! Thanks again to Lucky for all your help

  6. #6
    Join Date
    May 2016
    Posts
    1,072
    Here is the result of the help on animation: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=802927588[/url]

    CLICKY! If you know scripting, this make for a nice, easy-to-tie-in trigger for your scripts. There is a scripted button inside of it, all set up for action, which also triggers the animation.

    ITS LIKE YOU'RE REALLY CLICKING THINGS.

  7. #7
    Join Date
    Dec 2016
    Location
    Boston, MA
    Posts
    5
    I think there's something I'm missing (clearly running up against the limits of my knowledge of Unity animations)...

    I've been able to create a 3D object (a cube), a simple Animation (the cube turning 90 degrees), and the appropriate Animator. I added the TTS Asset Bundle Effect script and created a Trigger Effect for Animation, with the proper Animation Component and Animation Name. I built the AssetBundle and imported it into TTS. The animation played instantly on import, and the trigger effect, which is there, does nothing. I went back into Unity's Animator tab, and removed the Animation from the "Entry" state. Rebundled, and the animation won't play at all. Reconnect the Animation to "Entry," and it plays automatically again. I've also made sure that "Play Automatically" is unchecked in the object inspector. I'm going nuts trying to figure out how to get the animation to play only on the trigger action...

  8. #8
    Hey Gazoxtahagen, Welcome to the Community

    If you post up an image of your inspector panel with the components opened up and visible we can take a look at it for you.

    But I'd suggest you make sure the animation has been set to Legacy and the animator in the Inspector panel has its controller set to "None" as well.

    Its certainly something simple . . .it always is . . . annoyingly.

  9. #9
    Join Date
    May 2016
    Posts
    1,072
    I summon Lucky for assistance with this! lol

    Is it possible you accidentally set the animation as a looping effect and not a trigger effect in the TTS script element? If you had "Play Automatically" unchecked, to my knowledge, that is the only thing that might cause it to start up immediately. It is probably something else, but I have no other ideas.

  10. #10
    Join Date
    Dec 2016
    Location
    Boston, MA
    Posts
    5
    That's what it was: I had the Controller in the Animator inspector set to the object's Animation Controller, which must kick in the Entry state and play the Controller logic. Once I'd set it to None, it works as expected!

  11. #11
    Told you it would be something annoyingly simple

    Took me 3 full days of teeth gnashing and hair pulling to fully get to grips with the animation side of that blasted program.

  12. #12
    Join Date
    Dec 2016
    Location
    Boston, MA
    Posts
    5
    Here's something else I think I figured out (with a sinking feeling)... my experiments have led me to believe this:

    Unity Animations support property changes from keyframe to keyframe, such as Transform/Position and Transform/Rotation. There's also a property called Mesh Renderer/Material Reference[0], which allows for the material element to be changed; for example, an Animation could have a disk object start standing up with a happy-face material, and the next keyframe could have it lie down (Transform/Rotation) and apply a sad-face material (Mesh Renderer/Material Reference[0]). It seems as though legacy animations, however, do not support Mesh Renderer properties, and the process of converting an Animation to "Legacy" to work with the TTS script will strip out the Mesh Renderer changes... the imported AssetBundle will have a trigger where the happy face will lie down, but the sad face never appears. Therfore, there is currently no way to trigger a material change with a TTS AssetBundle.

    Is any of that (hopefully) incorrect?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •