| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hi, thanks for the patch, can you extend it to allow customizing the thread to use ? (currently it only use the GameThread). Note that the last Py_INCREF(Py_None) is not required, as it is implicit in Py_RETURN_NONE |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Took longer than expected to get the time to make the pull request, but as per request #181 (comment)
This variant will allow you to pass in a variable such as a python object in the callback. Example use case here
https://github.com/getnamo/tensorflow-ue4/blob/master/Content/Scripts/TensorFlowComponent.py#L164
Note that this particular call uses an alias defined here: https://github.com/getnamo/UnrealEnginePython/blob/b652cbfd759da6045a2f89c4d4080526b33d3c47/Source/UnrealEnginePython/Private/UEPyModule.cpp#L501, alias not required for functionality and it's not included in the pull request. Instead you would write:
For the other route (game thread->run something on background thread) it's probably better to use python's Thread model (see: https://github.com/getnamo/UnrealEnginePython/blob/master/Content/Scripts/upythread.py for an example)