Code Monkey home page Code Monkey logo

playmodegrapheditor's Introduction

PlaymodeGraphEditor (beta version)

This project allow to construct and edit a node graph in a Unity game in playmode (at runtime).

A calculator graph

I've added support (in progress) for the EditorWindow system as well.

A calculator graph in an EditorWindow

How to use

Clone the project and export the content as a package.

You can take a look at the examples to see how it works.

You can then customize the USS.

Examples

There are two graph examples:

  • A simple example, to interact with the graph
  • A more complete example, the calculator example, which show how to:
    • Add nodes, remove nodes
    • Use the nodes (to do the computation of the graph)
    • Make custom color connections
    • Save & load the graph

There is also a EditorWindow example, that you can access via "PlaymodeGraphEditor/Open calculator example"

Requirements

I am using Unity 2021.3.3f1.

Known issues

The canvas is not infinite.

When we are zooming, in or out, the TextFields are not displayed any long, when we zoom out, there is a white area instead of the normal background color of the TextFields, this is a limitation of Unity I believe, since I did not setup this and I could not fix it.

If you create an EditorWindow, make sure that the backgrounds are transparent, for the canvases. Otherwise, you will not see the lines of the graph. I opened a thread in Unity's forum for this.

I've encounter some issues while exporting the package, sometimes, Unity does not include necessary ASM definitions.

In an EditorWindow, the drag & drop of the line is a little bugged, it will show the line only after a few seconds, the updates are also only done once every few seconds. I am working at fixing these issue.

Release Notes

0.0.2

  • Added support for EditorWindow.

0.0.1

  • Initial release of the library.

Credits

I am using the draw connections method of Node_Editor_Framework.

The pointer I am using, to display the forbidden area is created by Freepik - Flaticon and can be found here.

playmodegrapheditor's People

Contributors

isirode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

r2d2m moto2002

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.