# How do you get auto completion and stuff?

**URL:** <https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [October 30, 2018, 1:40am UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114 "2018-10-30T01:40:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![vito0719](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vito0719](https://forums.unrealengine.com/u/vito0719)\
**Post date:** [October 30, 2018, 1:40am UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/1 "2018-10-30T01:40:32Z")

</div>

I’m trying to write unreal python in vs code. But I’m just writing blindly… How do you import unreal and get all the auto completion, function list, etc?

---

<div class="post-metadata">

**Author:** ![Spazmotic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spazmotic](https://forums.unrealengine.com/u/Spazmotic)\
**Post date:** [October 30, 2018, 5:48pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/2 "2018-10-30T17:48:32Z")

</div>

I do most of my Python in Atom or other IDEs a `little bit` more python-happy, but it looks like you can use this to bring Python Autocomplete using Intellisense into VC Code

> **[Visual Studio IntelliCode - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode)**
>
> Extension for Visual Studio Code - AI-assisted development

---

<div class="post-metadata">

**Author:** ![vito0719](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vito0719](https://forums.unrealengine.com/u/vito0719)\
**Post date:** [October 31, 2018, 8:57am UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/3 "2018-10-31T08:57:31Z")

</div>

Thanks but it doesn’t provide auto complete when I’m doing Unreal stuff… Do you have code completion writing Unreal stuff?

---

<div class="post-metadata">

**Author:** ![pf\_breton](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pf_breton/32/719217_2.png) [@pf\_breton](https://forums.unrealengine.com/u/pf_breton)\
**Post date:** [January 3, 2019, 9:40pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/4 "2019-01-03T21:40:04Z")

</div>

I managed to have some level of success with Atom and a stub file generated by Unreal running the python plugin in developer mode. I wrote a pdf (attached) with the steps I have taken. Let me know if you think there are other or better ways to do this.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![Narsoi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Narsoi](https://forums.unrealengine.com/u/Narsoi)\
**Post date:** [January 10, 2019, 11:17pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/5 "2019-01-10T23:17:15Z")

</div>

Hello Pf\_breton, is there any way to use the stub file generated for PyCharm as well?

---

<div class="post-metadata">

**Author:** ![AlexQuevillon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/alexquevillon/32/751975_2.png) [@AlexQuevillon](https://forums.unrealengine.com/u/AlexQuevillon)\
**Post date:** [January 10, 2019, 11:45pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/6 "2019-01-10T23:45:38Z")

</div>

Hello,

In my case, in PyCharm, I simply added the stup into my project directory and then the ‘‘auto complete’’ works.

 ![PyCharmAutoComplete.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/9/492d138e18ac88798b1331d1d6ad872580a7f081.png)

---

<div class="post-metadata">

**Author:** ![Zyanim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zyanim](https://forums.unrealengine.com/u/Zyanim)\
**Post date:** [January 12, 2019, 3:58pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/7 "2019-01-12T15:58:21Z")

</div>

You can also set it up in PyCharm by adding the Python stub path to the interpreter path (this should technically keep it auto updated if the stub changes in later versions).

 ![unreal_auto_complete_pycharm.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/f/ef9f4cc15e71f0a65b9d030536d875e33e713dea.png)

---

<div class="post-metadata">

**Author:** ![Narsoi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Narsoi](https://forums.unrealengine.com/u/Narsoi)\
**Post date:** [January 12, 2019, 4:47pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/8 "2019-01-12T16:47:02Z")

</div>

Thanks both Zyanim and Alex!  
I noticed you don’t get all the autocomplete possible from the python API documentation, If i add them manually in Unreal.py will it work ?  
Was thinking populating the unreal stub with stuff I use along the way.

Thanks!

---

<div class="post-metadata">

**Author:** ![Zyanim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zyanim](https://forums.unrealengine.com/u/Zyanim)\
**Post date:** [January 12, 2019, 6:03pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/9 "2019-01-12T18:03:35Z")

</div>

You could add them manually in to the unreal.py, but version changes could wipe any additions you make. One way to get around this is to create a new python file (for example sake it’s called unreal\_custom\_autocomplete) and add any additional code in there. Then add the following to the start of unreal.py:

```auto

from unreal_custom_autocomplete import *

```

This way you only need to add that line in every time the stub gets updated.

 ![unreal_custom_autocomplete.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/f/7f278a492e69f9d15b5a8811f6530e984ce77590.png)

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [January 12, 2019, 7:44pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/10 "2019-01-12T19:44:33Z")

</div>

> [@Narsoi](#):
>
> I noticed you don’t get all the autocomplete possible from the python API documentation

The unreal.py stub file is actually the same file we use to generate the online docs, _however_ the version we use for the docs is generated from an editor that has every plugin enabled so that you get a complete set of available code.

The version you get locally will only contain the things are are currently available to your editor based on your set of enabled plugins. It is generated each time the editor starts though, so enabling a new plugin will automatically add the stub for code it 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5460ea73](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5460ea73](https://forums.unrealengine.com/u/anonymous_user_5460ea73)\
**Post date:** [January 16, 2019, 3:32pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/11 "2019-01-16T15:32:42Z")

</div>

Hi ,  
thanks for the guide and the information.  
I am able to use the unreal.py stub with the [Atom.io](http://Atom.io) IDE however there is still a lot of classes missing and I don’t think it depends on plugins (eg EditorLevelLibrary, StaticMeshActor are missing but I am able to use the via script in the Unreal Editor).  
Since having auto completition will be a huge saving of time for many people isn’t there a way to generate the full stub?  
As an alternative could you share the full stub that you used to generate the online documentation for the current version?

As a side question related to this: is there any chance to have the interactive interpreter with auto-complete such as the Blender one? I think it’s very useful and powerful to prototype the first draft of a script and the time saving is huge.

Thanks,

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [January 17, 2019, 3:59pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/12 "2019-01-17T15:59:51Z")

</div>

@.15 Are they actually missing from the unreal.py stub file, or is the file too big for your IDE to handle? I had to up the parsing limit in PyCharm quite a bit for it to parse that file, and I don’t know whether other IDEs have similar restrictions.

We could ship the version we build the docs from, but then you’d be missing all of your project specific exposed code. You can generate a complete unreal.py stub (including code for your own project) by running our commandlet (see Engine\Plugins\Experimental\PythonScriptPlugin\SphinxDocs\PythonAPI\_docs\_readme.txt for information on how to do that). That will also generate a local set of docs from that stub file.

---

<div class="post-metadata">

**Author:** ![vito0719](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vito0719](https://forums.unrealengine.com/u/vito0719)\
**Post date:** [January 17, 2019, 5:55pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/13 "2019-01-17T17:55:37Z")

</div>

Didn’t expect this one to be replied again… I actually found out about the stub but was only able to generate a small file that provides minimum actual help… Much like .15’s situation I think.

---

<div class="post-metadata">

**Author:** ![vito0719](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vito0719](https://forums.unrealengine.com/u/vito0719)\
**Post date:** [January 18, 2019, 8:13am UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/14 "2019-01-18T08:13:19Z")

</div>

> [@](#):
>
> @.15 Are they actually missing from the unreal.py stub file, or is the file too big for your IDE to handle? I had to up the parsing limit in PyCharm quite a bit for it to parse that file, and I don’t know whether other IDEs have similar restrictions.
> 
> We could ship the version we build the docs from, but then you’d be missing all of your project specific exposed code. You can generate a complete unreal.py stub (including code for your own project) by running our commandlet (see Engine\Plugins\Experimental\PythonScriptPlugin\SphinxDocs\PythonAPI\_docs\_readme.txt for information on how to do that). That will also generate a local set of docs from that stub file.

I went to see my stub and it’s a 1000 line 35kb file. And somehow I don’t have that readme text file…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5460ea73](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5460ea73](https://forums.unrealengine.com/u/anonymous_user_5460ea73)\
**Post date:** [January 18, 2019, 2:47pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/15 "2019-01-18T14:47:38Z")

</div>

> [@vito0719](#):
>
> I went to see my stub and it’s a 1000 line 35kb file. And somehow I don’t have that readme text file…

I have the same unreal.py file generated and the same directory content in my C:\Program Files\Epic Games\UE\_4.21\Engine\Plugins\Experimental\PythonScriptPlugin\SphinxDocs

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [January 18, 2019, 3:03pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/16 "2019-01-18T15:03:44Z")

</div>

The stub file should go into your project folder, as Intermediate/PythonStub/unreal.py.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5460ea73](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5460ea73](https://forums.unrealengine.com/u/anonymous_user_5460ea73)\
**Post date:** [January 18, 2019, 5:52pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/17 "2019-01-18T17:52:38Z")

</div>

> [@](#):
>
> The stub file should go into your project folder, as Intermediate/PythonStub/unreal.py.

I deleted the file Intermediate/PythonStub/unreal.py and restarted the engine. I get the file generated but it is only 35Kb as the one obtained by vito0719.  
If I understand correctly it should be much bigger, right?  
I am using UE 4.21.1. Could I have something wrong with my setup?

---

<div class="post-metadata">

**Author:** ![dschertenleib](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dschertenleib](https://forums.unrealengine.com/u/dschertenleib)\
**Post date:** [January 18, 2019, 6:58pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/18 "2019-01-18T18:58:43Z")

</div>

I managed to get autocomplete in Pycharm a while ago but as the others, i only have a 35kb file with 1000 lines of code.  
This seems to only contains the Native types of the python API…

Also tried in a blank project to enable each and every one plugin…still the same 35kb file  
4.21.1

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [January 18, 2019, 11:39pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/19 "2019-01-18T23:39:07Z")

</div>

It seems that this was accidentally broken when making some changes to the API export logic. It had been set-up so that the glue code was only exported into the stub when we were generating API documentation. I’ve fixed this in CL# 4757354 (for 4.22).

---

<div class="post-metadata">

**Author:** ![dschertenleib](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dschertenleib](https://forums.unrealengine.com/u/dschertenleib)\
**Post date:** [January 19, 2019, 7:02pm UTC](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114/20 "2019-01-19T19:02:12Z")

</div>

great news!

[Next page](https://forums.unrealengine.com/t/how-do-you-get-auto-completion-and-stuff/118114.md?page=2)
