I’m currently trying to write Python scripts to help me automate some tasks in an Unreal Engine project, but the Python API for Unreal is huge, the docs are not great, and docs search is slow. To help me easily find functions, I’d like to be able to use a Python stub file (generated by the engine, and named unreal.py) to give Sublime Text information about the API so it can provide me with autocomplete suggestions, and ideally show function parameters etc. as an IDE might. I’ve seen examples of people using this stub file to set up autocomplete with PyCharm, and was wondering if it was possible in Sublime.
If someone has experience with this kind of thing and can explain how to set it up, I would be super happy.
Below is an example of the code inside the stub file unreal.py:
class LayersSubsystem(EditorSubsystem):
"""
Layers Subsystem
**C++ Source:**
- **Module**: UnrealEd
- **File**: LayersSubsystem.h
"""
def update_all_view_visibility(self, layer_that_changed):
"""
x.update_all_view_visibility(layer_that_changed) -> None
Updates the visibility for all actors for all views.
Args:
layer_that_changed (Name): If one layer was changed (toggled in view pop-up, etc), then we only need to modify actors that use that layer.
"""
return None