Local->Global

As the title says, is there a way for making a local object into a Global?

I have some projects with a WiFiManager. Its example works like a charm. However, there is a function:
wifiManager.resetSettings();
that I want to call from a loop by a key. Problem is that wifiManager is declared inside the setup.
An example is AutoConnectWithFSPParameters.

Or, is there another way? I am all ears.

Post an example sketch showing the problem

Problem is that wifiManager is declared inside the setup.

Why ?

UKHeliBob:
Post an example sketch showing the problem
Why ?

Compiling.

exit status 1
'wifiManager' was not declared in this scope

Just use AutoConnectWithFSPParameters.ino and put anywhere inside Loop this:
wifiManager.resetSettings();
You don't have to upload it, obviously. Just try to compile.
I can upload this example, but just to waste space here.

Not why is it a problem, rather why declare it in setup() when you want to use it elsewhere ?