hi i have an gui (inventory) when i click on it my attack animation(i called attack animation with every mouse 0 click) i play. i want when my mouse is in inventory or casting panel and mouse 0 clicked then dont play my attack animation. any one can help? thankful.
Have a Boolean variable "inventoryopen" set to false right off the bat. When you open your inventory set it to true, and when you close your inventory set it to false. Then when you play through your attack script you check to make sure its set to false.
1-can understand when mouse enter window?(inventory window) 2-Avo thanks for your answer.i want when inventory is open and player click in the area that is out of inventory window then animation.play start. thankful.
I think you would use; http://unity3d.com/support/documentation/ScriptReference/Rect.Contains.html But maybe using a array of all your Rect's would work better, or even a large Rect that covers your inventory. Anyway hope it helps.