potokaalex / Inspector-Graph

Simple tool for drawing a graph in the inspector.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

titleBanner

Introduction

Inspector Graph is a tool for drawing a mathematical function as a property in the inspector.
This tool is open source.

Requirements

  • Unity 2021.2 and up.

User manual

To use this in your project, you have to download the repository and place it anywhere in the "Assets" folder.
Then, in any Monobehaviour script, connect the "InspectorGraph" namespace and inherit from "IFunction".
Don't forget to define the "GetFunctionValue" method in which you should specify your mathematical function.
Then define the "Graph" field. You may not initialize it, but it must be public or marked with the "[SerializeField]" attribute.
The place where the graph is displayed depends on the location of the "Graph" field.

License

See here.

About

Simple tool for drawing a graph in the inspector.

License:MIT License


Languages

Language:C# 100.0%