1. What setup should I use to properly initialize item object variables? So each item instance has its own variables during runtime. I tried multiple setting and nothing seems to be working for me:
https://gyazo.com/d9a5a7d02c917151b5d35ee66724853f

2. I have installed Malbers Controller, but was not able to make animate it using Custom Animations system:
https://gyazo.com/90c6f528868badd25032ecf304521454
Setting any method here doesn't get called at all.

  • 1) Use Local variable origin.
    I'll add the info in the editor to make this easier :)

    2) Can you link me to a documentation on what function to call on Malbers?
    Also, did you set the combatant's animation system to Custom and define the component there?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 1. Hm.. setting 'Local' doesn't seems to do anything too https://gyazo.com/6c2384032c1eafcf8010e39ffafadecd

    Item during runtime doesn't have any variables component on it: https://gyazo.com/9d6808127ebd9d023fc0deeb500b67c4

    2. Yeah, setting 'Custom' to combatant's animation system is what I was missing. Now it does try to call methods I am setting in the custom animations.
    However it works on some methods, but sometimes it shows warning "Method call failed (MalbersAnimations.Controller.MAnimal):"
    https://gyazo.com/85fa3342511f79af834491124cf6c50b
  • 1) The spawned equipment doesn't have the component on them - it's on the EquipShortcut instance of the equipment (or ItemShortcut for items, etc.).

    2) Based on the message, the function was called but something in it caused an error (throwing an exception).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 1) I see, so in case I want variables to be on spawned equipment, I need to manually put this Variables Component on prefab and set variables from there? Will it cause some unexpected behavior or it should be fine?

    2) Yeah, you are right. After debugging the function I found what was causing Null Reference Exception. After fixing it, looks like Custom Animations are working fine so far.
  • 1) I don't think it'll cause issues - you can just set the Handler property of the object variables component to the equipment's variables.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.