Traffy.UnityPython icon indicating copy to clipboard operation
Traffy.UnityPython copied to clipboard

limited IO operations

Open thautwarm opened this issue 3 years ago • 1 comments

UnityPython is designed with security concerns kept in mind, which is to say, Python scripts do not have the permission to access IO operations, protected .NET APIs and so on.

However, for game use, accessing to specific file system is required to save game states.

thautwarm avatar Apr 01 '22 05:04 thautwarm

You can only use IO operations within Application.persistentDataPath. For instance, we can provide a module uio:

import uio
uio.open("a/b/c") # open ${Application.persistentDataPath}/a/b/c

thautwarm avatar Apr 01 '22 05:04 thautwarm