You should keep in mind that regularly foreigners are allowed to stay in Hungary for 90 days without registration (a residence permit, in most cases). Since verifying your citizenship takes usually around 6 months, you cannot just come here with a visa and wait for your citizenship approval. Either you have to leave after 90 days, wait 90 days somewhere else, and then come back for 90 days… Or, you can apply for a residence permit while you are waiting. The residence permit application can be based directly on your citizenship application, on some more regular options, like work, gainful activity (business operation), family unification, “another reason”, etc.
When you apply for a residence permit beside your citizenship verification, the Immigration Office will NOT give you a residence permit, since you might already be a Hungarian citizen (and Hungarian citizens obviously cannot hold residence permits). However, they will give you a temporary residency card which will let you stay in Hungary until your citizenship is verified. At the same time, your temporary residency card will not let you travel, so unless your existing passport or visa makes that possible, you are stuck in Hungary for the time being – or if you leave, you won’t be allowed to come back for 90 days.