void Layout( Connection connection, Vector2 sceneStart, Vector2 sceneEnd )

book_4_sparkGenerated
code_blocksInput

Description

The Layout method is responsible for defining the visual layout of a connection line between two nodes in a node editor. This method is part of the ConnectionStyle class, which serves as a base class for different styles of connection lines, such as curvy or angular.

Usage

To use the Layout method, you need to provide the following parameters:

  • connection: An instance of Editor.NodeEditor.Connection representing the connection between two nodes.
  • sceneStart: A Vector2 representing the starting point of the connection line in the scene.
  • sceneEnd: A Vector2 representing the ending point of the connection line in the scene.

This method does not return a value and is typically used to apply a specific visual style to the connection line based on the provided start and end points.

Example

// Example usage of the Layout method

// Assume 'connection' is a valid Connection object
// Assume 'start' and 'end' are valid Vector2 objects representing positions

Editor.NodeEditor.ConnectionStyle connectionStyle = Editor.NodeEditor.ConnectionStyle.Default;
connectionStyle.Layout(connection, start, end);