"what determines scale length....the neck or body or both???"
The neck, more than anything. There's a little more to it than whether or not it fits, which involves the body, and where the 12th fret is.
It does need to fit, of course. But, that's usually easy enough to do. The problem is then the frets themselves have to be spaced properly for the scale. Simply centering up the 12th fret isn't enough. You could put a 35" scale neck on a 30" scale body and with some creative routing and drilling, have the 12th fret show up in the right place. But, the spacing between the frets would be wrong. Intonation would be correct at the 12th fret, but nowhere else. Instead of a half step per fret, it would be something more. You'd be forever out of tune.
Warmoth sells what they call "conversion necks", but what makes them that way is they've recalculated the fret spacing to compensate. I've not seen their shop, but it's likely they have what's called a "gang saw" that cuts all the fret slots at once. So, they set up the cutters and spacers for the scale they want, and feed it necks until they don't need to. Change it over to another scale, and do the next batch.