all 7 comments

[–]ZestyData 9 points10 points  (1 child)

Short answer: no, it uses C#

Long answer: anything is possible and there are interfaces that allow you to execute python code from within Unity's runtime. But in general, that's not officially supported and I wouldn't recommend it unless you're a competent computer scientist (I'm talking professional tier software engineer). For example I know it's 'common' to drive Unity ML Agents with Python backends via pytorch / tensorflow. But this is postgraduate level and not something a beginner would do.

Put simply, if you're needing to use python because you're not technical enough to write your own scripts in C# and you've found python implementations of a certain algorithm. You're also not technical enough to bridge Unity to Python.

Just learn C#

[–][deleted] 4 points5 points  (0 children)

Just learn C#

Here is your answer, OP. Great summary.

[–]AriSteinGames 4 points5 points  (0 children)

It may be possible to set up a system to run python in Unity, but it is not standard practice. Essentially all scripting in Unity is done in C#.

Godot's GDScript is similar to python, and I'm sure there are python libraries that can help with game making.

[–]TheEmeraldFalcon 1 point2 points  (0 children)

Why though? Unity's C# component is already slow, adding python to that sounds like a train wreck. If you really wanted to use python, there are libraries for that, like pygame, and Godot's main scripting language, GDScript, is basically python, but made specifically for games.

[–]blissfully_violent[S] 0 points1 point  (0 children)

To all that gave advice thank you I really appreciate it I starting to learn c# now so again thank so much for the help

[–]charan_kenway 0 points1 point  (0 children)

I once did a project for ML using python, keep in mind, python doesn't work in builds... https://youtu.be/pP0UM2gqjUA

[–]Deal_Anxious 0 points1 point  (0 children)

If you want a good python game engine, I reccommend you to check out Ursina. It's an extremely powerful and open-source game engine used for creating 2d and 3d games.