Giter Site home page Giter Site logo

fractal-picture / unreal_python_recipe_book Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bralkor/unreal_python_recipe_book

0.0 0.0 0.0 22.07 MB

A Recipe Book on ways to use Python in Unreal Engine 5

License: MIT License

C++ 7.06% Python 92.00% C# 0.95%

unreal_python_recipe_book's Introduction



Unreal Python Recipe Book

This project explores the use of Python to interact with, manage, and extend aspects of Unreal Engine 5



Overview

This project is meant to supplement the offical Epic documentation on Python and is unaffiliated with Epic. This project is written and maintained by Brian Kortbus. This project is meant to provide examples of how Unreal's systems can be used via Python and explore what's possible. This project is considered incomplete, new pages and revisions will be added as time allows. We will also try to update this whenever a new version of Unreal is released, although it may not be available right away.

Please feel free to learn from and reference this project as you explore Python in Unreal!

There are two sections of this Project:

  1. Documentation covering various topics of using Python in Unreal
  2. An Unreal Plugin containing working code and demo material which may be placed in any UE5.2 project

The Documentation

    The Python Documentation covers the Python code provided in the Unreal Plugin for various topics. The focus of this documentation is on working examples, it is recommended readers already be familiar with both Unreal Engine and Python.

    Currently available pages:

    (0) Dev Conveniences

    Some small conveniences I've found and make use of in my own code.

    (1) Startup and Shutdown

    How to run code at various points of Unreal's startup and shutdown sequences.

    (2) Blueprint Function Libraries

    How to create Blueprint Graph function nodes in Python. This allows us far greater freedom and possibilities to call Python logic from the BP Graph. Examples with screenshots are provided for each individual option.

    (3) Using Assets in Python

    How to interact with Content Browser assets in Python. This covers instancing, properties, and calling Blueprint functions.

    (4) Extending Menus

    How to create and insert new menus in the Editor. This covers how to find menus, create drop down menus, and two styles of adding menu buttons.

    (5) Actor and Component Interactions

    How to interact with actors and components. This covers walking actor and component hierarchies as well as some basic interactions, such as determining the source asset of an actor.

    (6) Using Asset Metadata

    How to use and interact with Content Browser Asset metadata. This covers getting, setting, and searching for assets via metadata.

    (7) Editor Utility Widgets (EUWs) and Python

    How to manage EUWs with Python. This covers opening and closing EUWs, managing user prefs, and a danger when using EUWs with Python.

    (8) An Editor Utility Widget Example

    An example Editor Tool which makes use of Python. This tool displays arbitrary assets and allows for filtering based on their metadata values.

    (9) Making Python Blueprint Functions Safer

    Addressing the concerns mentioned on the Blueprint Function Libraries and EUWs and Python pages, this covers how to make Python-based Blueprint Functions safer to use.


The Unreal Plugin

    The provided PythonRecipeBook plugin contains all of the code covered in the Documentation. It may be added to any Unreal 5.2 project to demo the topics covered or review how the various parts work in practice.

    The plugin contains the following:

    • Python modules for all Documentation topics covered
    • c++ code exposing key some useful functionality to Python
    • A config ini to declare the metadata used by the the provided assets and meta_viewer
    • An Editor Utility Widget, meta_viewer, to demo using Python in UMG
    • A collection of arbitrary demo assets with metadata tags used by meta_viewer
    • An arbitrary 3D level that was used to test actor/component inspection

    Feel free to demo the meta_viewer tool in Unreal, dig into the Plugin modules, and try expanding functionality!


Special Thanks

    Rajesh Sharma
    For encouraging me to pick up this project again and keep working on it.


    Spire Animation Studios
    For providing an environment where I am able to persue this personal project and supporting my desire to make it public.


Contact

    This project is written and maintained by Brian Kortbus as a personal project. If you have any questions, suggestions, or Unreal code snippets you wish to share please feel free to message me on LinkedIn.


Updates

    While updates may be infrequent I do plan to add to and update this project as time allows. Please allow time as new versions of UE5 are released as updates may take time to publish.


    19 June 2023

      • built plugin for UE5.2 and updated doc links - no notable API changes

unreal_python_recipe_book's People

Contributors

bralkor avatar bkortbus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.