2
\$\begingroup\$

Using Godot Engine, I'm trying to implement digital rights management (DRM) using an uuid, and I want to get the user's MAC address. Is there an easy way to do this with gdscript?

On Linux, I could call OS.execute to run "ip link show" and parse out mac addresses from the output. However, I would rather not maintain platform specific versions. I also hope to avoid having to compile in native code.

\$\endgroup\$
2
\$\begingroup\$

As described in the doc, the function OS.get_unique_id() seems to do what I need, which is getting a constant string that is unique to the device. I don't know for certain that this uses the MAC address, but it satisfies the intent of my question.

var _user_id = OS.get_unique_id()

if can_user_reticulate_the_spline(_user_id):
    # ...
| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.