I am attempting to make a game that takes your IP address and simplifies it so that you can use it as a party code. I am also attempting to make this game cross-platform so that it can be run from iOS, Mac, Windows, Android, Linux and on Itch. How would I get the IPv4 address without having to exactly find the IPv4 on every device. I also can't just go and do every device because I don't have most of the devices I listed above. Is there just a code that grabs JUST your IP address. (also I have tried IP.getlocaladdresses() but it is different on every platform.) For example this is the kind of code I want:
What is was hoping that line of code would do is return "192.168.1.2" (Example IP) or whatever my IP was.