A simple hack you can do is to add a coroutine to set the move speed of the unit to 0 for the duration of the hit animation.
You can call this from AnimPlayHit() in Unit.cs, which is the function to play the hit animation. You can even pass the duration of the animation to the coroutine so the stop duration auto matches your hit animation. Something like this:
1. Second resource on tower build popup disappears after I mouse over ability popup
Iāve checked and this also happens in fresh TDTK project without any modifications. Easy to reproduce; create a new project. Install TDTK and create a new scene Tool-> TDTK ā News scene. Without any modifications on code you can see this issue.
Here is the video: Second Resource To Build Tower Disappears After Ability Popup
2. Creep stops suddenly on a path
Unfortunately this is the biggest issue Iāve faced until now. Creep stops but animation continues. You can check on this video: Creep stops in the middle of the path
I think there is a similar post for the 2nd issue in this topic. Itās posted by someone else but I couldnāt see the solution.
The second issue is probably because of the IEnumerator StopDuringHitAnimation() change Iāve done above.
Iāve performed test for 2hrs. Issue is gone when I revert back Unit.cs and it appears again if I include StopDuringHitAnimation.
As for the second one. Iām not quite sure whatās wrong. Itās either the cache value being 0 or the delay value is somehow very long. But please try this:
Iām not sure how it happen. I canāt reproduce the warning myself. But unless you see the creep exhibiting strange pathing behaviour, it should be harmless.
I should say that while this may fix the problem. The simple logic with this function may not be perfect if you have multiple towers attacking one creep at the same time. The creep will only stop in response to the first attack but ignore the rest until it starts moving again.