Skip to content

Commit 1076ba2

Browse files
author
Unity Technologies
committed
com.unity.visualscripting@1.9.2
## [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 parent 3127a0f commit 1076ba2

File tree

60 files changed

+183
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+183
-46
lines changed

CHANGELOG.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
All notable changes to this project will be documented in this file.
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44

5+
## [1.9.2] - 2023-10-30
6+
### Fixed
7+
- 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)
8+
- 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)
9+
10+
### Changed
11+
- AnimationEvent and NamedAnimationEvent Nodes icon changed in favor of the AnimationClip icon instead of the Animation Component icon.
12+
513
## [1.9.1] - 2023-08-15
614
### Fixed
715
- Reverted a breaking change where `LudiqScriptableObject._data` was marked as `private`
@@ -13,19 +21,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1321
- Fixed OnInputSystemEvent doesn't trigger until Input Vector variates from 0.5 [UVSB-2435](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2435)
1422
- Fixed assembly disappearing from Node Library after domain reload. [UVSB-2459](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2459)
1523
- Fixed custom inspectors not being generated [UVSB-2466](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2466)
16-
- Fixed error when trying to load exceptions for TryCatch node dropdown [2463] (https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2463)
17-
- 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)
24+
- Fixed error when trying to load exceptions for TryCatch node dropdown [UVSB-2463](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2463)
25+
- 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)
1826
- Removed corrupt mdb which caused the ScriptUpdater to fail [UVSB-2360](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2360)
1927
- Fixed Gradient graph variables resetting when entering PlayMode [UVSB-2334](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2334)
20-
- Fixed Memory leak after destroying object [UVSB-2427] (https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2427)
28+
- Fixed Memory leak after destroying object [UVSB-2427](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2427)
2129
- 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)
2230

2331
### Added
2432
- 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)
2533

2634
### Changed
27-
- Script Graph Asset string data is unloaded after deserialization [UVSB-2367](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2366)
28-
- AOT Prebuild should take less memory and be faster (Added an optimization to AssetUtility.GetAllAssetsOfType<T>)
35+
- Script Graph Asset string data is unloaded after deserialization [UVSB-2366](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2366)
36+
- 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)
2937

3038
## [1.8.0] - 2022-11-03
3139
### Fixed

Documentation~/vs-control.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,12 @@ For example, the following graph generates a new random name until the result is
6969

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

72-
For example, the following graph outputs three messages to the console:
72+
For example, the following graph outputs four messages to the console:
7373

74-
* *I like cats*
75-
* *I like dogs*
76-
* *I like birds*
74+
* *I love my cat*
75+
* *I love my dog*
76+
* *I love my bird*
77+
* *I love my fish*
7778

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

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

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

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

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

94-
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:
95+
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:
9596

9697
* *I like cats*
98+
* *I like dogs*
9799
* *I like birds*
100+
* *I like horses*
98101

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

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

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

144-
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.
145-
146-
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.
147+
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.
147148

148149
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:
149150

150-
| Port | Triggered When |
151-
|---|---|
152-
| On| Flow enters the toggle via the unmarked input while it is on.|
153-
| Off| Flow enters the toggle via the unmarked input while it is off.|
151+
| Port | Triggered When |
152+
|------------|--------------------|
153+
| On | Flow enters the toggle via the unmarked input while it is on. |
154+
| Off | Flow enters the toggle via the unmarked input while it is off. |
154155
| Turned On | The toggle gets turned on, either via the On or Toggle inputs. |
155156
| Turned Off | The toggle gets turned off, either via the Off or Toggle inputs. |
156157

Documentation~/vs-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> [!NOTE]
44
> For versions 2019/2020 LTS, download the Visual Scripting package from the [Unity Asset Store](https://assetstore.unity.com/packages/tools/visual-bolt-163802).
55
6-
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.
6+
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.
77

88
## Predictive Debugging
99

Documentation~/vs-live.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ When in live mode, Visual Scripting is displayed the flow as droplets on connect
2121

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

24-
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**).
24+
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**).
2525

2626
## Saving changes through persistence
2727

28-
Visual Scripting graphs automatically saves the changes made during play mode.
28+
Visual Scripting graphs automatically save the changes made during play mode.
2929

3030
## Propagation across graphs
3131

32-
Changes made to graphs are instantly shared across all instances of that graph.
32+
Changes made to a graph are instantly shared across all instances of that graph.

Runtime/VisualScripting.Core/Attributes.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#if UNITY_EDITOR && UNITY_2021_1_OR_NEWER
2+
#define CAN_USE_CUSTOM_HELP_URL
3+
#endif
4+
5+
using System;
6+
using System.Diagnostics;
7+
using UnityEngine;
8+
9+
namespace Unity.VisualScripting
10+
{
11+
#if CAN_USE_CUSTOM_HELP_URL
12+
using UnityEditor.PackageManager;
13+
[Conditional("UNITY_EDITOR")]
14+
class VisualScriptingHelpURLAttribute : HelpURLAttribute
15+
{
16+
const string k_BaseURL = "https://docs.unity3d.com/Packages/com.unity.visualscripting@";
17+
const string k_MidURL = "/api/";
18+
const string k_EndURL = ".html";
19+
const string k_FallbackVersion = "1.9";
20+
21+
static string s_PackageVersion;
22+
23+
static string PackageVersion
24+
{
25+
get
26+
{
27+
if (string.IsNullOrEmpty(s_PackageVersion))
28+
{
29+
var packageInfo = PackageInfo.FindForAssetPath("Packages/com.unity.visualscripting");
30+
s_PackageVersion = packageInfo == null ? k_FallbackVersion : GetMinorPackageVersionString(packageInfo.version);
31+
}
32+
33+
return s_PackageVersion;
34+
}
35+
}
36+
37+
// internal for test
38+
internal static string GetMinorPackageVersionString(string versionString)
39+
{
40+
var split = versionString.Split('.');
41+
return split.Length < 2 ? $"{split[0]}.0" : $"{split[0]}.{split[1]}";
42+
}
43+
44+
public VisualScriptingHelpURLAttribute(Type type)
45+
: base(HelpURL(type)) {}
46+
47+
static string HelpURL(Type type)
48+
{
49+
return $"{k_BaseURL}{PackageVersion}{k_MidURL}{type.FullName}{k_EndURL}";
50+
}
51+
}
52+
#else //HelpURL attribute is `sealed` in previous Unity versions
53+
[Conditional("UNITY_EDITOR")]
54+
class VisualScriptingHelpURLAttribute : Attribute
55+
{
56+
public VisualScriptingHelpURLAttribute(Type type) { }
57+
}
58+
#endif
59+
}

Runtime/VisualScripting.Core/Attributes/VisualScriptingHelpURLAttribute.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/VisualScripting.Core/Listeners/AnimatorMessageListener.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace Unity.VisualScripting
1414
* The only solution seems to be to separate the listener as a manual component.
1515
*/
1616
[AddComponentMenu("Visual Scripting/Listeners/Animator Message Listener")]
17+
[VisualScriptingHelpURL(typeof(AnimatorMessageListener))]
1718
public sealed class AnimatorMessageListener : MonoBehaviour
1819
{
1920
private void OnAnimatorMove()

Runtime/VisualScripting.Core/Listeners/GlobalMessageListener.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Unity.VisualScripting
77
[AddComponentMenu("")]
88
[IncludeInSettings(false)]
99
[TypeIcon(typeof(MessageListener))]
10+
[VisualScriptingHelpURL(typeof(GlobalMessageListener))]
1011
public sealed class GlobalMessageListener : MonoBehaviour, ISingleton
1112
{
1213
private void OnGUI()

Runtime/VisualScripting.Core/Listeners/MonoBehaviour/UnityOnBecameVisibleMessageListener.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace Unity.VisualScripting
22
{
33
[UnityEngine.AddComponentMenu("")]
4+
[VisualScriptingHelpURL(typeof(UnityOnBecameVisibleMessageListener))]
45
public sealed class UnityOnBecameVisibleMessageListener : MessageListener
56
{
67
private void OnBecameVisible()

0 commit comments

Comments
 (0)