It seems like you are asking for trouble by entering places where undesirables may be inhabiting. Bringing a gun into the situation could be worse, especially if you shoot someone or the weapon is turned on you. If you are setting up a film shoot, give the police a heads up.
The direct answer to your question is YES. The police will almost always confiscate any weapon used during a crime, and trespassing is a crime. Cops like to take guns from criminals to get them off the street. You sir, are a criminal in this instance. Further, you are seriously asking for trouble on many levels by acting in this manner. You should either get permission first or work on finding a legal hobby. You are headed down a bad path.
I agree with the recommendations posted before me and wish to add the following. You indicate that "sometimes buildings aren't marked" and that you obtain permission in those instances where they are posted. How bout confining your forays into abandoned buildings for which you are able to get explicit permission to enter--and get that permission in writing. During those "sometimes" situations, move on to the next location. I don't know where you are pursuing this hobby, and if it were located near the posted city of Wilkes Barre I wouldn't be sufficiently familiar with the number of candidate structures, but my guess is that somewhere not to distant from your home you can find enough to keep you busy. Alternatively you could consult with a local criminal defense attorney and get insights from someone qualified in your particular area. Good luck and be safe.