GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gustavopsantos/Runtime-Visual-Scripting

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
Assets
Assets
 
 
Packages
Packages
 
 
ProjectSettings
ProjectSettings
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
demo.gif
demo.gif
 
 

Repository files navigation

Runtime Visual Scripting

Demo

It's an experimental project, I'm still not happy with the way nodes are created, a simple node like SetPosition ends up having 35 lines, and that's not what I want. I'll keep experimenting and see what I can get.

Node Samples

Get Elapsed Time

using UnityEngine;

public class GetElapsedTimeNode : Node
{
    private void Start()
    {
        SetTitle("Get Elapsed Time");
        AddParameterOutput<float>((_) => Time.time);
    }
}

Cos

using UnityEngine;

public class CosNode : Node
{
    private void Start()
    {
        SetTitle("Cos");
        var rad = AddParameterInput<float>((socket) => (float) (socket.Connection ? socket.Connection.Evaluate : default(float)), "Rad");
        AddParameterOutput<float>((socket) => Mathf.Cos((float) rad.Evaluate), "Cos");
    }
}

Set Position

using UnityEngine;

public class SetPositionNode : Node
{
    private Socket _target;
    private Socket _x;
    private Socket _y;
    private Socket _z;

    private Socket _next;

    private void Start()
    {
        SetTitle("Set Position");
        AddExecutionInput((socket) => SetPosition());
        _next = AddExecutionOutput((socket) => { socket.Connection?.Execute(); });
        _target = AddParameterInput<GameObject>((socket) => (GameObject) (socket.Connection ? socket.Connection.Evaluate : null), "Target");
        _x = AddParameterInput<float>((socket) => (float) (socket.Connection ? socket.Connection.Evaluate : default(float)), "X");
        _y = AddParameterInput<float>((socket) => (float) (socket.Connection ? socket.Connection.Evaluate : default(float)), "Y");
        _z = AddParameterInput<float>((socket) => (float) (socket.Connection ? socket.Connection.Evaluate : default(float)), "Z");
    }

    private void SetPosition()
    {
        var target = (GameObject) _target.Evaluate;
        
        if (target != null)
        {
            var position = new Vector3((float) _x.Evaluate, (float) _y.Evaluate, (float) _z.Evaluate);
            target.transform.position = position;
        }

        _next.Execute();
    }
}

Contributing

Here’s how we suggest you go about proposing a change to this project:

  1. Fork this project to your account.
  2. Create a branch for the change you intend to make.
  3. Make your changes to your fork.
  4. Send a pull request from your fork’s branch to our master branch.

Using the web-based interface to make changes is fine too, and will help you by automatically forking the project and prompting to send a pull request too.

About

No description or website provided.

Topics

unityvisualscripting

Resources

Readme
MIT license
Activity

Stars

15 stars

Watchers

1 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.