omid3098 / IronPythonUnity

Program using python in Unity game engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IronPythonUnity

Sample Usage:

  • Create a game object
  • Add PyBehaviour
  • Drag your python file into script field

image

  • Play the game

Sample Python code:

Hello word from Awake and Update functions in python:

import UnityEngine as unity
count = 1

def Awake():
    unity.Debug.Log("Hello from python Awake " +
                    gameObject.name + str(count))


def Update():
    global count
    count += 1
    unity.Debug.Log("Hello from python Update" + str(count))

Simple object rotator:

import UnityEngine as unity


def Update():
    transform.Rotate(1, 1, 1)

Platforms:

  • PC: supprted
  • Mobile: not-supported

About

Program using python in Unity game engine.

License:MIT License


Languages

Language:C# 100.0%