nils-soderman / vscode-unreal-python

Visual Studio Code extension with features to assist when writing python code for Unreal Engine
https://marketplace.visualstudio.com/items?itemName=NilsSoderman.ue-python
MIT License
85 stars 10 forks source link

VS code to UE 5.4 connection attempt fails #30

Closed jaypersy closed 5 months ago

jaypersy commented 5 months ago

VS code to UE 5.4 connection attempt fails. I have tried to dispatch the connection by changing the 1) "Remote mutlicast group endpint" => 239.0.0.1:6767 2) Remote: Multicast Bind Address => "0.0.0.0". Im not sure what the Remote: Command Endpoint should be. At this point, I have set it to 0.0.0.0:6767. Made sure the "remote muticast" values match in both vscode/UE5.4. Unfortuntaely, the connection issue is still not resolved.

Please let us know if the current version is compatible with UE5.4.

Kindly help.

Best Regards

nils-soderman commented 5 months ago

Hi,

This extension should work with UE 5.4 (I've only tested with Windows though, so let me know if you use another OS).

For the ue-python.remote.commandEndpoint, you do not want to use the same port as the ue-python.remote.multicastGroupEndpoint, these are 2 different servers that each need their own port.

For ue-python.remote.commandEndpoint you probably want to use the IP 127.0.0.1 instead of 0.0.0.0 too, even though I feel like both should work, doing a quick test I noticed using 0.0.0.0 fails for me too.

Cheers, Nils

jaypersy commented 5 months ago

Hi, Thanks for reaching out. I also use windows (win 11). When you mention "For ue-python.remote.commandEndpoint" (on the vscode) : I have changed it to "127.0.0.1:6768". However, the connect is still not ok. I get that wavy line underneath the "import unreal" indicating that the vscode is yet to reach the UE3.4 python packages.

At the moment, Im able to run all the python scripts i need inside the unreal engine, so it is not a show stopper situation. But i was really hoping, to make it run on the vscode. Does this extension work on "Spyder"?

Best Regards

nils-soderman commented 5 months ago

Ah, so this extension doesn't automatically connect to Unreal, it only does so when you run a command. Have you e.g. tried running the Unreal Python: Execute (Ctrl + Enter) command, and is that one giving you a "Timed out" error message? or is it just code completion that isn't working?

The code completion is handled by the Microsoft Python/Pylance extension. To setup code completion you can run the VS Code command Unreal Python: Setup code completion (in the command palette Ctrl + Shift + P) This will essentially only add the Unreal stub path to the python.analysis.extraPaths config. This can also be done manually, see: https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/ScriptingAndAutomation/Python/Autocomplete/

I'm not familiar with Spyder, but this extension is written specifically for VS Code.

jaypersy commented 5 months ago

Hi, Thanks a lot sir. I missed the vital points 1) "Unreal Python: Execute (Ctrl + Enter)" and 2) Unreal Python: Setup code completion

Now I can dispatch from vscode itself.

PS: Besides being brilliant. I see you are also very empathetic and kind hearted. Baruch Hashem. THe Lord be with you.

nils-soderman commented 5 months ago

Great, glad to hear it's working! Thanks, appreciate it! :)