Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Beginner

Antoine Charton edited this page Feb 4, 2018 · 4 revisions

Beginner

If you are not familiar at all with unity I suggest you start with the interface tutorials first (Less than an hour). I assume that you are at least familiar with it.

Overview

What will I learn?

  • How to setup constellation.
  • The basics of the interface.
  • How to use live editing
  • How nodes works.
  • How to see nodes help.
  • Understanding script execution order

What do I need?

  • You need the latest version of unity
  • When your unity is installed, you can Download or clone the repo.
  • Open the project with unity 2017.3.
  • Open the constellation Window (Constellation/editor).

The interface

The editor

alt text

  • Constellation tab: Currently open constellation
  • Node selection panel: The node list. Click one in the list to add it
  • Node editor: Where you edit your scripts

Assigning your script to a GameObject

alt text

  • Add a Constellation behaviour component to your GameObject
  • Add your Constellation script the script field.

Live profiling

  • Open the flappy bird example scene.
  • Make sure you have the constellation editor opened (Window/Constellation editor). alt text
  • Hit play.
  • Click on the gameobject you want to profile (in this case I suggest selecting Pref_Bird).
  • You should see live the bird values.

Integrated documentation

alt text

  • Click on the question mark on a node to get more informations about it and examples.

Scripting principles

Anatomy of a node

alt text

  • Inputs set variables in the node.
  • Outputs are the result.
  • A Variable is either a number, a string, an array, an object, or a list of variable (Very similar to the war in javascript).
  • A Unity variable is an object which inherits from unity object (Example transform, GameObject, Component).
  • Links allow you to connect a node output to a node input.

Understanding warm and cold

alt text

  • A cold input is used to set a variable. It does not trigger an output.​

alt text

  • A warm input will trigger an output.
  • A warm output is triggered without warm input. For example keyDown node will trigger an output because a key is pressed.
  • A cold output is triggered only when a warm input receives a message.

Understand script Execution order.

  • In constellation nodes are executed from top to bottom.
  • To test that just add a word node and a print node. Enter in the attribute field "Word 1" and connect it to the print.
  • Add an other word node, place it bellow the previous word, set the field to "Word 2" and connect it to the print node.
  • Select your cube make sure your constellation editor is opened and hit play!
  • You should see in the console

Word 1

Word 2

alt text

  • Stop playing.
  • Now try to put the word 2 node on top of the word 1.
  • You will see now that word 2 is printing before word 1.

Word 2

Word 1

alt text