Which part that uses hyphen would affect code?
Personally I greatly dislike underscore. It's too large and makes things ugly, particularly with variable width fonts, but I also don't use it in code with fixed width fonts. In Spine projects I use hyphen and encourage it. All our examples use hyphen. The names of things in your Spine project don't appear in code verbatim and camel case is better IMO. 🙂
Space is also OK in Spine projects and I would prefer space to underscore, even with the drawback that you can't see it.