How can I make AI unable to see me while my character has an invisible material?

I made an invisible material, but I want AI lose me when My character has this material.

At the checking service (I guess you use BT to handle your AI) check the bool variable from your character, which should depend on the type of material.

Do you still need any help?

another easy question:))

create a physical material and name it invisible and add it to your material then trace a ray from your AI’s eye to character and break hit result and get physical material and check to see if that is equal to invisible if true then prevent AI from seeing character :)))