Custody, child support ect

Shay • Due 12/13/15 💙
Okay this is long but I need advice 
My now ex fiancé decided he didn't wanna be with me at 26 weeks pregnant... He thinks it's best I live with my family in NJ (we currently live in SC) suddenly today he was talking about getting a lawyer for custody (partial) & jus in case.... How does custody work if we weren't married and I end up birthing the child in another state ? Does custody automatically go to me ? How do I try to get full custody ? I don't think he's fit to have our child on his own, he's an alcoholic and almost lost his house due to not paying taxes... I'm so lost