Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.9.2] - 2023-10-30
### Fixed
- Fixed a bug where the second player input device controlled all objects when using InputSystem event nodes [UVSB-2499](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2499)
- Documentation links have been fixed for Visual Scripting MonoBehaviours [UVSB-2475](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2475) [UVSB-2496](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2496)

### Changed
- AnimationEvent and NamedAnimationEvent Nodes icon changed in favor of the AnimationClip icon instead of the Animation Component icon.
  • Loading branch information
Unity Technologies committed Oct 30, 2023
1 parent 3127a0f commit 1076ba2
Show file tree
Hide file tree
Showing 60 changed files with 183 additions and 46 deletions.
18 changes: 13 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [1.9.2] - 2023-10-30
### Fixed
- Fixed a bug where the second player input device controlled all objects when using InputSystem event nodes [UVSB-2499](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2499)
- Documentation links have been fixed for Visual Scripting MonoBehaviours [UVSB-2475](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2475) [UVSB-2496](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2496)

### Changed
- AnimationEvent and NamedAnimationEvent Nodes icon changed in favor of the AnimationClip icon instead of the Animation Component icon.

## [1.9.1] - 2023-08-15
### Fixed
- Reverted a breaking change where `LudiqScriptableObject._data` was marked as `private`
Expand All @@ -13,19 +21,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed OnInputSystemEvent doesn't trigger until Input Vector variates from 0.5 [UVSB-2435](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2435)
- Fixed assembly disappearing from Node Library after domain reload. [UVSB-2459](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2459)
- Fixed custom inspectors not being generated [UVSB-2466](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2466)
- Fixed error when trying to load exceptions for TryCatch node dropdown [2463] (https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2463)
- Fixed infinite amount of GameObjects created in Prefab mode when performing a null check of a scene variable in editor with an "OnDrawGizmos" event [UVSB-2453](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2453)
- Fixed error when trying to load exceptions for TryCatch node dropdown [UVSB-2463](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2463)
- Fixed infinite amount of GameObjects created in Prefab mode when performing a null check of a scene variable in editor with an `OnDrawGizmos` event [UVSB-2453](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2453)
- Removed corrupt mdb which caused the ScriptUpdater to fail [UVSB-2360](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2360)
- Fixed Gradient graph variables resetting when entering PlayMode [UVSB-2334](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2334)
- Fixed Memory leak after destroying object [UVSB-2427] (https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2427)
- Fixed Memory leak after destroying object [UVSB-2427](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2427)
- Fixed migration deserialization bug introduced in 1.8.0 [UVSB-2492](https://issuetracker.unity3d.com/issues/deserialization-error-when-upgrading-to-1-dot-8-0)

### Added
- Added a warning icon next to assemblies in Project Settings that reference Editor assemblies [UVSB-2382](https://issuetracker.unity3d.com/issues/nodes-from-runtime-assemblies-that-reference-unity-editor-are-not-visible-in-the-fuzzy-finder)

### Changed
- Script Graph Asset string data is unloaded after deserialization [UVSB-2367](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2366)
- AOT Prebuild should take less memory and be faster (Added an optimization to AssetUtility.GetAllAssetsOfType<T>)
- Script Graph Asset string data is unloaded after deserialization [UVSB-2366](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2366)
- AOT Prebuild should take less memory and be faster (Added an optimization to `AssetUtility.GetAllAssetsOfType<T>`) [UVSB-2417](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2417)

## [1.8.0] - 2022-11-03
### Fixed
Expand Down
29 changes: 15 additions & 14 deletions Documentation~/vs-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ For example, the following graph generates a new random name until the result is

For Each iterates over every element of a collection. It outputs the current index and item that is being looped over.

For example, the following graph outputs three messages to the console:
For example, the following graph outputs four messages to the console:

* *I like cats*
* *I like dogs*
* *I like birds*
* *I love my cat*
* *I love my dog*
* *I love my bird*
* *I love my fish*

![](images/vs-control-for-each-loop-node.png)

Expand All @@ -87,14 +88,16 @@ For example, this graph counts to ten by skipping odd numbers because of its ste

![](images/vs-control-for-loop-node.png)

The for loop can also be very useful when combined to the Get List Item and Count Items nodes.
The For loop can also be very useful when combined with the Get List Item and Count Items nodes.

For example, the folllowing graph is very similar to the last graph as the output to the console is "I like {animal}s".
For example, the following graph is very similar to the last graph as the output to the console is "I like {animal}s".

Instead of using the for each node that outputs each item, the graph outputs each item manually by its index in the list. This specifies a different increment (in this case 2) and skips some items. This graph outputs two messages:
Instead of using the For Each node that outputs each item, the graph outputs each item manually by its index in the list. This graph outputs the following messages:

* *I like cats*
* *I like dogs*
* *I like birds*
* *I like horses*

![](images/vs-control-for-loop-node-get-count-list-items-node.png)

Expand Down Expand Up @@ -141,16 +144,14 @@ Toggle nodes are similar in principle to light-switches: they can be turned on a

The Toggle Flow node gates the flow of control. When on, the flow passes through; when off, the flow does not.

There are many inputs and outputs that allow fine grain control over the logic. In the previous example, Toggle is used to show the same event (a keypress) turns the toggle on and off. This can be done by using On and Off through two different events.

There are many inputs and outputs that allow fine grain control over the logic. In a previous example, Toggle is used to show the same event (a keypress) turns the toggle on and off; for the same results using two different events, use On and Off instead.
There are many inputs and outputs that allow fine grained control over the logic. In the previous example, Toggle is used to show how the same event (a keypress) turns the toggle on and off. Instead you can use On and Off with two different events to get the same results.

On the output side, the Is On boolean port indicates the toggle status, that is turned on or off. The control outputs are triggered according to the table below:

| Port | Triggered When |
|---|---|
| On| Flow enters the toggle via the unmarked input while it is on.|
| Off| Flow enters the toggle via the unmarked input while it is off.|
| Port | Triggered When |
|------------|--------------------|
| On | Flow enters the toggle via the unmarked input while it is on. |
| Off | Flow enters the toggle via the unmarked input while it is off. |
| Turned On | The toggle gets turned on, either via the On or Toggle inputs. |
| Turned Off | The toggle gets turned off, either via the Off or Toggle inputs. |

Expand Down
2 changes: 1 addition & 1 deletion Documentation~/vs-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> [!NOTE]
> For versions 2019/2020 LTS, download the Visual Scripting package from the [Unity Asset Store](https://assetstore.unity.com/packages/tools/visual-bolt-163802).
Visual scripting can predict and indicate nodes in the script that can cause an error before entering play mode. It also analyzes your graphs to anticipate missing components or null references. If an error occurs at runtime, visual scripting pin-points the source of the euro by highlighting it in the graph.
Visual scripting can predict and indicate nodes in the script that can cause an error before entering play mode. It also analyzes your graphs to anticipate missing components or null references. If an error occurs at runtime, visual scripting pin-points the source of the error by highlighting it in the graph.

## Predictive Debugging

Expand Down
6 changes: 3 additions & 3 deletions Documentation~/vs-live.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ When in live mode, Visual Scripting is displayed the flow as droplets on connect

![](images/vs-live-editing-droplets.png)

To disable these animations on either the value connections, the control connections, or both, uncheck the **Animate Control Connections** or the **Animate Value Connections** from the editor preferences window (**Unity** > **Preferences** > **Visual Scripting** > **Script Graphs**).
To disable these animations on either the value connections, the control connections, or both, deselect the **Animate Control Connections** or the **Animate Value Connections** from the editor preferences window (**Edit** > **Preferences** > **Visual Scripting** > **Script Graphs**).

## Saving changes through persistence

Visual Scripting graphs automatically saves the changes made during play mode.
Visual Scripting graphs automatically save the changes made during play mode.

## Propagation across graphs

Changes made to graphs are instantly shared across all instances of that graph.
Changes made to a graph are instantly shared across all instances of that graph.
8 changes: 8 additions & 0 deletions Runtime/VisualScripting.Core/Attributes.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#if UNITY_EDITOR && UNITY_2021_1_OR_NEWER
#define CAN_USE_CUSTOM_HELP_URL
#endif

using System;
using System.Diagnostics;
using UnityEngine;

namespace Unity.VisualScripting
{
#if CAN_USE_CUSTOM_HELP_URL
using UnityEditor.PackageManager;
[Conditional("UNITY_EDITOR")]
class VisualScriptingHelpURLAttribute : HelpURLAttribute
{
const string k_BaseURL = "https://docs.unity3d.com/Packages/com.unity.visualscripting@";
const string k_MidURL = "/api/";
const string k_EndURL = ".html";
const string k_FallbackVersion = "1.9";

static string s_PackageVersion;

static string PackageVersion
{
get
{
if (string.IsNullOrEmpty(s_PackageVersion))
{
var packageInfo = PackageInfo.FindForAssetPath("Packages/com.unity.visualscripting");
s_PackageVersion = packageInfo == null ? k_FallbackVersion : GetMinorPackageVersionString(packageInfo.version);
}

return s_PackageVersion;
}
}

// internal for test
internal static string GetMinorPackageVersionString(string versionString)
{
var split = versionString.Split('.');
return split.Length < 2 ? $"{split[0]}.0" : $"{split[0]}.{split[1]}";
}

public VisualScriptingHelpURLAttribute(Type type)
: base(HelpURL(type)) {}

static string HelpURL(Type type)
{
return $"{k_BaseURL}{PackageVersion}{k_MidURL}{type.FullName}{k_EndURL}";
}
}
#else //HelpURL attribute is `sealed` in previous Unity versions
[Conditional("UNITY_EDITOR")]
class VisualScriptingHelpURLAttribute : Attribute
{
public VisualScriptingHelpURLAttribute(Type type) { }
}
#endif
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace Unity.VisualScripting
* The only solution seems to be to separate the listener as a manual component.
*/
[AddComponentMenu("Visual Scripting/Listeners/Animator Message Listener")]
[VisualScriptingHelpURL(typeof(AnimatorMessageListener))]
public sealed class AnimatorMessageListener : MonoBehaviour
{
private void OnAnimatorMove()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Unity.VisualScripting
[AddComponentMenu("")]
[IncludeInSettings(false)]
[TypeIcon(typeof(MessageListener))]
[VisualScriptingHelpURL(typeof(GlobalMessageListener))]
public sealed class GlobalMessageListener : MonoBehaviour, ISingleton
{
private void OnGUI()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnBecameVisibleMessageListener))]
public sealed class UnityOnBecameVisibleMessageListener : MessageListener
{
private void OnBecameVisible()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnCollisionExitMessageListener))]
public sealed class UnityOnCollisionExitMessageListener : MessageListener
{
private void OnCollisionExit(Collision collision)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnCollisionStayMessageListener))]
public sealed class UnityOnCollisionStayMessageListener : MessageListener
{
private void OnCollisionStay(Collision collision)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_2D_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnJointBreak2DMessageListener))]
public sealed class UnityOnJointBreak2DMessageListener : MessageListener
{
private void OnJointBreak2D(Joint2D brokenJoint)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnJointBreakMessageListener))]
public sealed class UnityOnJointBreakMessageListener : MessageListener
{
private void OnJointBreak(float breakForce)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnMouseDownMessageListener))]
public sealed class UnityOnMouseDownMessageListener : MessageListener
{
private void OnMouseDown()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnMouseDragMessageListener))]
public sealed class UnityOnMouseDragMessageListener : MessageListener
{
private void OnMouseDrag()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnMouseEnterMessageListener))]
public sealed class UnityOnMouseEnterMessageListener : MessageListener
{
private void OnMouseEnter()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnMouseExitMessageListener))]
public sealed class UnityOnMouseExitMessageListener : MessageListener
{
private void OnMouseExit()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnMouseOverMessageListener))]
public sealed class UnityOnMouseOverMessageListener : MessageListener
{
private void OnMouseOver()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnMouseUpMessageListener))]
public sealed class UnityOnMouseUpMessageListener : MessageListener
{
private void OnMouseUp()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_2D_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnTriggerEnter2DMessageListener))]
public sealed class UnityOnTriggerEnter2DMessageListener : MessageListener
{
private void OnTriggerEnter2D(Collider2D other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnTriggerEnterMessageListener))]
public sealed class UnityOnTriggerEnterMessageListener : MessageListener
{
private void OnTriggerEnter(Collider other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_2D_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnTriggerExit2DMessageListener))]
public sealed class UnityOnTriggerExit2DMessageListener : MessageListener
{
private void OnTriggerExit2D(Collider2D other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnTriggerExitMessageListener))]
public sealed class UnityOnTriggerExitMessageListener : MessageListener
{
private void OnTriggerExit(Collider other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_2D_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnTriggerStay2DMessageListener))]
public sealed class UnityOnTriggerStay2DMessageListener : MessageListener
{
private void OnTriggerStay2D(Collider2D other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Unity.VisualScripting
{
#if MODULE_PHYSICS_EXISTS
[AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnTriggerStayMessageListener))]
public sealed class UnityOnTriggerStayMessageListener : MessageListener
{
private void OnTriggerStay(Collider other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnButtonClickMessageListener))]
public sealed class UnityOnButtonClickMessageListener : MessageListener
{
private void Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnDropdownValueChangedMessageListener))]
public sealed class UnityOnDropdownValueChangedMessageListener : MessageListener
{
private void Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnInputFieldEndEditMessageListener))]
public sealed class UnityOnInputFieldEndEditMessageListener : MessageListener
{
private void Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnInputFieldValueChangedMessageListener))]
public sealed class UnityOnInputFieldValueChangedMessageListener : MessageListener
{
private void Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnScrollRectValueChangedMessageListener))]
public sealed class UnityOnScrollRectValueChangedMessageListener : MessageListener
{
private void Start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Unity.VisualScripting
{
[UnityEngine.AddComponentMenu("")]
[VisualScriptingHelpURL(typeof(UnityOnScrollbarValueChangedMessageListener))]
public sealed class UnityOnScrollbarValueChangedMessageListener : MessageListener
{
private void Start()
Expand Down
Loading

0 comments on commit 1076ba2

Please sign in to comment.