Python Module To Make GUI With A GUI Editor?

Hunter
2 min readSep 13, 2021

--

Still finding a Python module to design GUI with a GUI editor integrated? Then your search has ended. Read along to get more information about this amazing module!

So, today I am gonna introduce to a very popular application, Unity. But there is a twist… It is coded in Python! So you can think of it as a Python Implementation of Unity (we are not related to Unity in any way) which can make your life easier!

Can I know what it is called and some more information about it?

The module is known as PyUnity! It is made for lazy people like me (no offense) who don’t want to learn any other language or app just to make an app. This is made in pure Python, so a person who is acquainted in Python can contribute to this module damn easily!

So what about the Pros and Cons of this module?

Well, there are many pros and cons of this module (more pros than cons ngl).

PROS

  • Good and Helpful Community
  • Actively Developed
  • Less Bugs
  • Fast Support
  • Active Discord Server
  • Written in Pure Python
  • Integrated GUI Editor
  • Non Toxic Community

CONS

  • Not Recommended To Be Used In Production
  • Small Community
  • Does Not Provide All The Features
  • Still In Development

Well as said above, PyUnity may be unstable but the creator of the project (Ray) is trying his best to release a stable version of the library as soon as possible!

Enough information. Can I know how to get started with PyUnity?

As usual, the best way is to take a look at the docs, but below is some sample code to get you started!

from pyunity import Behaviour, SceneManager, GameObject, Vector3, MeshRenderer, Mesh, Material, RGB, ShowInInspectorclass Rotator(Behaviour):
a = ShowInInspector(int, 0)
def Update(self, dt):
self.transform.eulerAngles += Vector3(0, 90, 135) * dt
def main():
scene = SceneManager.AddScene("Scene")
scene.mainCamera.transform.localPosition = Vector3(0, 0, -10)
cube = GameObject("Cube")
renderer = cube.AddComponent(MeshRenderer)
renderer.mesh = Mesh.cube(2)
renderer.mat = Material(RGB(255, 0, 0))
cube.AddComponent(Rotator)
scene.Add(cube)
scene.List()
SceneManager.LoadScene(scene)
if __name__ == "__main__":
main()

You ask what the code above will do? It will show a rotating square on yr screen!

Want to get some more help?

PyUnity

Contact me

--

--

Hunter

I am Hunter. Nice to meet you! I am a student and also a Python Coder. Stay away from me, I got a fetish for Python codes 😉