How to hide show objects by widget?

I need them to continue cast shadow though even if hidden in game, which one is preferable then hidden or not visible?