Loic.Siccity.xNode 1.0.0

dotnet add package Loic.Siccity.xNode --version 1.0.0
                    
NuGet\Install-Package Loic.Siccity.xNode -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Loic.Siccity.xNode" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Loic.Siccity.xNode" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Loic.Siccity.xNode" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Loic.Siccity.xNode --version 1.0.0
                    
#r "nuget: Loic.Siccity.xNode, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Loic.Siccity.xNode&version=1.0.0
                    
Install Loic.Siccity.xNode as a Cake Addin
#tool nuget:?package=Loic.Siccity.xNode&version=1.0.0
                    
Install Loic.Siccity.xNode as a Cake Tool

<img align="right" width="100" height="100" src="https://user-images.githubusercontent.com/37786733/41541140-71602302-731a-11e8-9434-79b3a57292b6.png">

Discord GitHub issues GitHub license GitHub Wiki openupm

Downloads / Asset Store / Documentation

Support xNode on Ko-fi or Patreon

xNode

Thinking of developing a node-based plugin? Then this is for you. You can download it as an archive and unpack to a new unity project, or connect it as git submodule.

xNode is super userfriendly, intuitive and will help you reap the benefits of node graphs in no time. With a minimal footprint, it is ideal as a base for custom state machines, dialogue systems, decision makers etc.

<p align="center"> <img src="https://user-images.githubusercontent.com/6402525/53689100-3821e680-3d4e-11e9-8440-e68bd802bfd9.png"> </p>

Key features

  • Lightweight in runtime
  • Very little boilerplate code
  • Strong separation of editor and runtime code
  • No runtime reflection (unless you need to edit/build node graphs at runtime. In this case, all reflection is cached.)
  • Does not rely on any 3rd party plugins
  • Custom node inspector code is very similar to regular custom inspector code
  • Supported from Unity 5.3 and up

Wiki

Installation

<details><summary>Instructions</summary>

Installing with Unity Package Manager

Via Git URL (Requires Unity version 2018.3.0b7 or above)

To install this project as a Git dependency using the Unity Package Manager, add the following line to your project's manifest.json:

"com.github.siccity.xnode": "https://github.com/siccity/xNode.git"

You will need to have Git installed and available in your system's PATH.

If you are using Assembly Definitions in your project, you will need to add XNode and/or XNodeEditor as Assembly Definition References.

Via OpenUPM

The package is available on the openupm registry. It's recommended to install it via openupm-cli.

openupm add com.github.siccity.xnode

Installing with git

Via Git Submodule

To add xNode as a submodule in your existing git project, run the following git command from your project root:

git submodule add git@github.com:Siccity/xNode.git Assets/Submodules/xNode

Installing 'the old way'

If no source control or package manager is available to you, you can simply copy/paste the source files into your assets folder.

</details>

Node example:

// public classes deriving from Node are registered as nodes for use within a graph
public class MathNode : Node {
    // Adding [Input] or [Output] is all you need to do to register a field as a valid port on your node 
    [Input] public float a;
    [Input] public float b;
    // The value of an output node field is not used for anything, but could be used for caching output results
    [Output] public float result;
    [Output] public float sum;

    // The value of 'mathType' will be displayed on the node in an editable format, similar to the inspector
    public MathType mathType = MathType.Add;
    public enum MathType { Add, Subtract, Multiply, Divide}
    
    // GetValue should be overridden to return a value for any specified output port
    public override object GetValue(NodePort port) {

        // Get new a and b values from input connections. Fallback to field values if input is not connected
        float a = GetInputValue<float>("a", this.a);
        float b = GetInputValue<float>("b", this.b);

        // After you've gotten your input values, you can perform your calculations and return a value
        if (port.fieldName == "result")
            switch(mathType) {
                case MathType.Add: default: return a + b;
                case MathType.Subtract: return a - b;
                case MathType.Multiply: return a * b;
                case MathType.Divide: return a / b;
            }
        else if (port.fieldName == "sum") return a + b;
        else return 0f;
    }
}

Plugins

Plugins are repositories that add functionality to xNode

Community

Join the Discord server to leave feedback or get support. Feel free to also leave suggestions/requests in the issues page.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 1 7/31/2021