Because you have a valid residence permit in Hungary, Germany would probably reject your asylum application as inadmissible. This means that Hungary is responsible for your asylum application. However, one could then complain against such a decision and argue that it is not reasonable to go to Hungary. This could be successful, but should be looked at in individual cases.