Search Unity

official python API?

Discussion in 'General Discussion' started by unity_Jw2aalTMhEAwZQ, Jan 12, 2018.

  1. unity_Jw2aalTMhEAwZQ

    unity_Jw2aalTMhEAwZQ

    Joined:
    Jan 12, 2018
    Posts:
    7
    Hi, I would like to use unity engine in my projects, in which I need to precisely control the properties of the contents. We prefer to have it integrated with python, as all of our other software are written with python, which are also required in the project. I am wondering if unity plans to develop a full python API or at least python wrappers for the whole c# API. If not, what are the best solution in terms of your experience. I do need python for sure.

    Another question is whether unity could be fully programmed by the C# API without the manual adjustment using the GUI so that we could maximize out throughput for the project. Thanks in advance.
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,128
    They're currently in the process of ripping out every scripting language other than C#.

    https://blogs.unity3d.com/2017/08/11/unityscripts-long-ride-off-into-the-sunset/

    One of them is a Python derivative named Boo but like the JavaScript derivative it's not the same as the Python you are familiar with. Python, for example, uses duck typing by default but for Boo everything is statically typed. You can see additional differences at the link below but basically you wouldn't have wanted to use this Python.

    https://github.com/boo-lang/boo/wiki/Gotchas-for-Python-Users
     
    Last edited: Jan 12, 2018
    Peter77 likes this.
  3. unity_Jw2aalTMhEAwZQ

    unity_Jw2aalTMhEAwZQ

    Joined:
    Jan 12, 2018
    Posts:
    7
    Thanks a lot! Clear enough! Do you know the answer for this question as well?
    Another question is whether unity could be fully programmed by the C# API without the manual adjustment using the GUI so that we could maximize out throughput for the project. Thanks in advance.
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,128
    If you're referring to avoiding the editor as much as possible then the answer is yes. You only need a single scene with a single gameobject that has a single script attached to it. Everything else can be handled through code.
     
    zombiegorilla likes this.
  5. unity_Jw2aalTMhEAwZQ

    unity_Jw2aalTMhEAwZQ

    Joined:
    Jan 12, 2018
    Posts:
    7
  6. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    It can be done like explained above, but i would say it is a big mistake to do so, and you will just end up spending a lot of timing trying trying to solve problems to things that are easy in the editor.

    Also i love me some Python too, but it would be a pretty terrible way to interact with unity, since a lot of unity really relies heavily on the type system.
     
  7. gargd

    gargd

    Joined:
    Apr 15, 2017
    Posts:
    3


    Hi, you can implement sockets between unity and python to create a real-time interface between them