Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

[UPDATED] Sheath Script v1.1 is now live! - Sheathe and unsheathe anything.

Discussion in 'Assets and Asset Store' started by KevIU, Feb 4, 2019.

  1. KevIU

    KevIU

    Joined:
    Feb 21, 2017
    Posts:
    47

    Sheathe and unsheathe any kind of weapon with this easy to use script!

    No coding required!

    Compatible with State Machine Behaviours and Animation Events!

    Includes:

    - 2 easy and fast to implement scripts.​

    - 1 basic example character model.​

    - 7 basic example weapon models.​

    - 38 compatible with Mecanim animations of sheathe and unsheath from different locations:
    hips, back, lower back, dual wield or single hand (right and left) and mixed animations (back and hips).​

    - 43 example prefabs with different combinations of sheaths.​

    - 16 example animator controllers.​

    Source code included!

    Changelog:

    1.1
    - Added new animations and sheath examples (Katana and Leg Knife).
    - Added an intuitive custom inspector.
    - Added easier and better compatibility with Animation Events.
    - Now you can create infinity number of sheaths.​

    Contact Support:
    support@keviniglesias.com

    www.keviniglesias.com

     
    Last edited: May 15, 2019
  2. KevIU

    KevIU

    Joined:
    Feb 21, 2017
    Posts:
    47
  3. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    247
    Hi, Im using animation event to call Sheath but nothing happens the weapon is still on the characters back not in the hand. The "weapon" points to the Sword parented to the weapon sheath game object (the active one)



    Edit: My bad I was calling the wrong method, it should be Unsheath
     
    Last edited: May 16, 2019
  4. KevIU

    KevIU

    Joined:
    Feb 21, 2017
    Posts:
    47
    Hi skinwalker,

    I see you already figured out. The methods for Animation Events are 'Sheath' for placing the object back to its sheath and 'Unsheath' for taking out the object to the hand. There is more info in the Documentation.

    I also recommend to check out the State Machine Behaviour example script, depending on your animation system it may be helpful in some cases since Animation Events are sometimes skipped if they are between animation transitions. Using State Machine Behaviour ensures the method is called.
     
  5. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    247
    I dont use the animator I use Animancer
    I dont think I can use the state machine behavior in that case, maybe I can try calling the method from code?
     
  6. KevIU

    KevIU

    Joined:
    Feb 21, 2017
    Posts:
    47
    skinwalker likes this.
  7. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    247
    I like the plugin and the animations you provided work great on my characters (saves me a lot of time). About the animation events Im sure there wont be a transition to interrupt the event, Im using behavior trees and I basically go like this

    Play equip animation (with the sheathe event) -> Wait 1 second -> Switch to combat animation
     
    KevIU likes this.
  8. KevIU

    KevIU

    Joined:
    Feb 21, 2017
    Posts:
    47
    Thank you very much! I think it won't give you trouble but if you find something not working just mail me to support@keviniglesias.com