Skip to content

Commit 287aad1

Browse files
author
Unity Technologies
committed
com.unity.visualscripting@1.9.7
## [1.9.7] - 2025-05-22 ### Fixed - Fixed a warning "Unable to load Unity.Android.Gradle's referenced assembly NiceIO" when scanning assemblies. [UVSB-2594](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2594) - Fixed error when trying to load fuzzy finder on multi screen setup on Mac. [UVSB-2419](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2419) - Fixed the `AOTSafeMode` project setting appearing in the Editor Preferences window. It is now shown in the Project Settings tab for Visual Scripting. [UVSB-2590](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2590) - Fixed possible crash on VisionOS. [UVSB-2565](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2565) ### Changed - The `AOTSafeMode` project setting has been marked as not visible, it will no longer be included when calling `ConfigurationPanel.GetSearchKeywords`. [UVSB-2590](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2590)
1 parent a507de9 commit 287aad1

File tree

14 files changed

+292
-43
lines changed

14 files changed

+292
-43
lines changed

.signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":1741279420,"signature":"ohZbOxTXZchmbMZkQkNiWOjvrW0Vhdz4aBRXillD8dsUiy4L3JlNyh3rAK63ijVpL2RvSuPDfYwLS/dBME/I230LO0jCDtBn7d8s08SMGAQ/35KOT+MfpRPMSxw0cJ16EhPOjEDFvNX6E7ELTLI/GRXQv80b2Vru6+RVLdRjzcWA30IaVOkWUgeF8O2mFaR2hYxLWU6PMPY3QcakZL+aCobXDIo6mV5iIRptsiW8BNcvUm/uHC4WpSHu7Xr573UFvPAz/Gel2KVae9/8YAxGYE2UoUgJ27ApwFDAsImvZI1ItIi8s3+0tO846AB+5f0s0byIJpDGuzRg4kPfszLYwa3gQPXsQAV3+1viKoUNRHPaZq3QRbJn/c/e6g7tr9IASjXFLCPixORl5/NSjh4MahwL6OYuDGFCI1cSld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UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
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.7] - 2025-05-22
6+
### Fixed
7+
- Fixed a warning "Unable to load Unity.Android.Gradle's referenced assembly NiceIO" when scanning assemblies. [UVSB-2594](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2594)
8+
- Fixed error when trying to load fuzzy finder on multi screen setup on Mac. [UVSB-2419](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2419)
9+
- Fixed the `AOTSafeMode` project setting appearing in the Editor Preferences window. It is now shown in the Project Settings tab for Visual Scripting. [UVSB-2590](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2590)
10+
- Fixed possible crash on VisionOS. [UVSB-2565](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2565)
11+
12+
### Changed
13+
- The `AOTSafeMode` project setting has been marked as not visible, it will no longer be included when calling `ConfigurationPanel.GetSearchKeywords`. [UVSB-2590](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2590)
14+
515
## [1.9.6] - 2025-03-05
616
### Fixed
717
- Fixed the output path for Property Providers generated from User Editor code. [UVSB-2550](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2550)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
using UnityEditor;
2+
using UnityEngine;
3+
4+
namespace Unity.VisualScripting
5+
{
6+
internal class CoreSettings
7+
{
8+
private readonly PluginConfigurationItemMetadata _aotSafeMode;
9+
10+
private const string Title = "Core Settings";
11+
12+
readonly GUIContent _toggleAOTSafeModeLabel = new GUIContent("AOT Safe Mode");
13+
14+
private bool _setting;
15+
16+
public CoreSettings(BoltCoreConfiguration coreConfig)
17+
{
18+
_aotSafeMode = coreConfig.GetMetadata(nameof(BoltCoreConfiguration.aotSafeMode));
19+
20+
_setting = (bool)_aotSafeMode.value;
21+
}
22+
23+
private void SaveIfNeeded()
24+
{
25+
var settings = (bool)_aotSafeMode.value;
26+
27+
if (_setting != settings)
28+
{
29+
_aotSafeMode.value = _setting;
30+
31+
_aotSafeMode.SaveImmediately();
32+
}
33+
}
34+
35+
public void OnGUI()
36+
{
37+
GUILayout.Space(5f);
38+
39+
GUILayout.Label(Title, EditorStyles.boldLabel);
40+
41+
GUILayout.Space(5f);
42+
43+
_setting = GUILayout.Toggle(_setting, _toggleAOTSafeModeLabel);
44+
45+
SaveIfNeeded();
46+
}
47+
}
48+
}

Editor/SettingsProvider/ProjectSettings/CoreProviderSettings.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.

Editor/SettingsProvider/ProjectSettings/TypeOptionsSettings.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public class TypeOptionsSettings
88
private readonly PluginConfigurationItemMetadata _typeOptionsMetadata;
99

1010
private bool _showTypeOption = false;
11+
private const string NodeGenerationSettingsTitle = "Generate Nodes";
1112
private const string TitleTypeOption = "Type Options";
1213
private const string DescriptionTypeOption = "Choose the types you want to use for variables and nodes.\n"
1314
+ "MonoBehaviour types are always included.";
@@ -35,6 +36,12 @@ public TypeOptionsSettings(BoltCoreConfiguration coreConfig)
3536

3637
public void OnGUI()
3738
{
39+
GUILayout.Space(5f);
40+
41+
GUILayout.Label(NodeGenerationSettingsTitle, EditorStyles.boldLabel);
42+
43+
GUILayout.Space(5f);
44+
3845
_showTypeOption = EditorGUILayout.Foldout(_showTypeOption, new GUIContent(TitleTypeOption, DescriptionTypeOption));
3946

4047
if (_showTypeOption)

Editor/SettingsProvider/ProjectSettingsProviderView.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ internal class ProjectSettingsProviderView : SettingsProvider
77
{
88
private const string Path = "Project/Visual Scripting";
99
private const string Title = "Visual Scripting";
10-
private const string TitleGroup = "Generate Nodes";
1110
private readonly GUIStyle marginStyle = new GUIStyle() { margin = new RectOffset(10, 10, 10, 10) };
1211

12+
private CoreSettings _coreSettings;
1313
private AssemblyOptionsSettings _assemblyOptionsSettings;
1414
private TypeOptionsSettings _typeOptionsSettings;
1515
private CustomPropertyProviderSettings _customPropertyProviderSettings;
@@ -27,6 +27,7 @@ public ProjectSettingsProviderView() : base(Path, SettingsScope.Project)
2727

2828
private void CreateOptionsIfNeeded()
2929
{
30+
_coreSettings ??= new CoreSettings(_vsCoreConfig);
3031
_assemblyOptionsSettings ??= new AssemblyOptionsSettings(_vsCoreConfig);
3132
_typeOptionsSettings ??= new TypeOptionsSettings(_vsCoreConfig);
3233
_customPropertyProviderSettings ??= new CustomPropertyProviderSettings();
@@ -59,10 +60,6 @@ public override void OnGUI(string searchContext)
5960

6061
GUILayout.Space(5f);
6162

62-
GUILayout.Label(TitleGroup, EditorStyles.boldLabel);
63-
64-
GUILayout.Space(10f);
65-
6663
// happens when opening unity with the settings window already opened. there's a delay until the singleton is assigned
6764
if (_vsCoreConfig == null)
6865
{
@@ -72,6 +69,10 @@ public override void OnGUI(string searchContext)
7269

7370
CreateOptionsIfNeeded();
7471

72+
_coreSettings.OnGUI();
73+
74+
GUILayout.Space(10f);
75+
7576
_typeOptionsSettings.OnGUI();
7677

7778
GUILayout.Space(10f);

Editor/VisualScripting.Core/Interface/Fuzzy/FuzzyWindow.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -611,20 +611,6 @@ private void OnPositioning()
611611
}
612612
position.height += footerHeight;
613613

614-
if (Application.platform == RuntimePlatform.OSXEditor && BoltCore.Configuration.limitFuzzyFinderHeight)
615-
{
616-
// OSX disregards the Y entirely if the window is higher than the desktop space
617-
// and will try to move it up until it fits. Therefore, we'll cut the window down here.
618-
// However, we can't use the screen resolution, because it doesn't include the dock.
619-
620-
var maxY = LudiqGUIUtility.mainEditorWindowPosition.yMax;
621-
622-
if (position.yMax > maxY)
623-
{
624-
position.height -= (position.yMax - maxY);
625-
}
626-
}
627-
628614
if (this.position != position || minSize != position.size)
629615
{
630616
minSize = maxSize = position.size;

Editor/VisualScripting.Core/Plugin/BoltCoreConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public bool humanNaming
233233
/// Whether some types, including generics, should be filtered out
234234
/// when targetting AOT platforms.
235235
/// </summary>
236-
[ProjectSetting]
236+
[ProjectSetting(visible = false, resettable = true)]
237237
[InspectorLabel("AOT Safe Mode")]
238238
public bool aotSafeMode { get; set; } = true;
239239

Editor/VisualScripting.Core/Reflection/Codebase.cs

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,20 @@ private static bool IsEditorAssembly(Assembly assembly, HashSet<string> visited)
379379
}
380380
catch (Exception e)
381381
{
382-
Debug.LogWarning($"(Visual Scripting) Unable to load {assembly.GetName().Name}'s referenced assembly {dependencyName.Name} while scanning for Editor assemblies, skipping over this referenced assembly. Exception Information :\n{e.GetType().Name}\n{e.Message}");
382+
var loadedFromDirectory =
383+
TryLoadAssemblyReferenceFromAssemblyDirectory(dependencyName, assembly, out var dependency);
384+
if (loadedFromDirectory)
385+
{
386+
if (IsEditorAssembly(dependency, visited))
387+
{
388+
_editorAssemblyCache.Add(assembly, true);
389+
return true;
390+
}
391+
}
392+
else
393+
{
394+
Debug.LogWarning($"(Visual Scripting) Unable to load {assembly.GetName().Name}'s referenced assembly {dependencyName.Name} while scanning for Editor assemblies, skipping over this referenced assembly. Exception Information :\n{e.GetType().Name}\n{e.Message}");
395+
}
383396
}
384397
}
385398

@@ -388,6 +401,41 @@ private static bool IsEditorAssembly(Assembly assembly, HashSet<string> visited)
388401
return false;
389402
}
390403

404+
/// <summary>
405+
/// This is used to load an assembly reference (dependency) that is located in the same folder as the parent assembly
406+
/// but not loaded by the Editor's AppDomain. The out param dependency can be null if this fails.
407+
/// </summary>
408+
/// <remarks>
409+
/// This is primarily used for Android builds, see Bug UVSB_2594 and UUM-98843.
410+
/// Ex: Unity.Android.Gradle.dll references NiceIO. NiceIO is not a "scripting" assembly that is explicitly
411+
/// loaded by Unity and is instead loaded dynamically at runtime when some code is jitted that requires the
412+
/// assembly to be loaded. This means the assembly is not in the search path, but is in the same directory as
413+
/// Unity.Android.Gradle.dll. Trying to call Assembly.Load("NiceIO") would fail, but this method would succeed.
414+
/// </remarks>
415+
private static bool TryLoadAssemblyReferenceFromAssemblyDirectory(AssemblyName referenceName, Assembly assembly, out Assembly dependency)
416+
{
417+
dependency = null;
418+
419+
var assemblyLocation = assembly.Location;
420+
var directory = System.IO.Path.GetDirectoryName(assemblyLocation);
421+
if (directory == null)
422+
return false;
423+
424+
var dependencyPath = System.IO.Path.Combine(directory, referenceName.Name + ".dll");
425+
if (!System.IO.File.Exists(dependencyPath))
426+
return false;
427+
428+
try
429+
{
430+
dependency = Assembly.LoadFrom(dependencyPath);
431+
return true;
432+
}
433+
catch (Exception)
434+
{
435+
return false;
436+
}
437+
}
438+
391439
private static bool IsUserAssembly(string name)
392440
{
393441
return

Runtime/VisualScripting.Core/Collections/ISet.cs

Lines changed: 71 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,98 @@ namespace Unity.VisualScripting
2121
{
2222
/// <summary>
2323
/// Generic collection that guarantees the uniqueness of its elements, as defined
24-
/// by some comparer. It also supports basic set operations such as Union, Intersection,
25-
/// Complement and Exclusive Complement.
24+
/// by a comparer. It also supports basic set operations such as Union, Intersection,
25+
/// Difference, and Symmetric Difference.
2626
/// </summary>
27+
/// <typeparam name="T">The type of elements contained in the set.</typeparam>
2728
public interface ISet<T> : ICollection<T>
2829
{
29-
//Add ITEM to the set, return true if added, false if duplicate
30+
/// <summary>
31+
/// Adds the specified item to the set.
32+
/// </summary>
33+
/// <param name="item">The item to add to the set.</param>
34+
/// <returns>
35+
/// <c>true</c> if the item was added to the set (i.e., it was not already present);
36+
/// otherwise, <c>false</c>.
37+
/// </returns>
3038
new bool Add(T item);
3139

32-
//Transform this set into its union with the IEnumerable<T> other
40+
/// <summary>
41+
/// Modifies the current set to contain all elements that are present in either the current set or the specified collection.
42+
/// </summary>
43+
/// <param name="other">The collection to compare to the current set.</param>
3344
void UnionWith(IEnumerable<T> other);
3445

35-
//Transform this set into its intersection with the IEnumberable<T> other
46+
/// <summary>
47+
/// Modifies the current set to contain only elements that are present in both the current set and the specified collection.
48+
/// </summary>
49+
/// <param name="other">The collection to compare to the current set.</param>
3650
void IntersectWith(IEnumerable<T> other);
3751

38-
//Transform this set so it contains no elements that are also in other
52+
/// <summary>
53+
/// Modifies the current set to contain only elements that are not present in the specified collection.
54+
/// </summary>
55+
/// <param name="other">The collection to compare to the current set.</param>
3956
void ExceptWith(IEnumerable<T> other);
4057

41-
//Transform this set so it contains elements initially in this or in other, but not both
58+
/// <summary>
59+
/// Modifies the current set to contain only elements that are present either in the current set or in the specified collection, but not both.
60+
/// </summary>
61+
/// <param name="other">The collection to compare to the current set.</param>
4262
void SymmetricExceptWith(IEnumerable<T> other);
4363

44-
//Check if this set is a subset of other
64+
/// <summary>
65+
/// Determines whether the current set is a subset of the specified collection.
66+
/// </summary>
67+
/// <param name="other">The collection to compare to the current set.</param>
68+
/// <returns>
69+
/// <c>true</c> if the current set is a subset of the specified collection; otherwise, <c>false</c>.
70+
/// </returns>
4571
bool IsSubsetOf(IEnumerable<T> other);
4672

47-
//Check if this set is a superset of other
73+
/// <summary>
74+
/// Determines whether the current set is a superset of the specified collection.
75+
/// </summary>
76+
/// <param name="other">The collection to compare to the current set.</param>
77+
/// <returns>
78+
/// <c>true</c> if the current set is a superset of the specified collection; otherwise, <c>false</c>.
79+
/// </returns>
4880
bool IsSupersetOf(IEnumerable<T> other);
4981

50-
//Check if this set is a subset of other, but not the same as it
51-
bool IsProperSupersetOf(IEnumerable<T> other);
52-
53-
//Check if this set is a superset of other, but not the same as it
82+
/// <summary>
83+
/// Determines whether the current set is a proper subset of the specified collection. A proper subset is a subset that is not equal to the other set.
84+
/// </summary>
85+
/// <param name="other">The collection to compare to the current set.</param>
86+
/// <returns>
87+
/// <c>true</c> if the current set is a proper subset of the specified collection; otherwise, <c>false</c>.
88+
/// </returns>
5489
bool IsProperSubsetOf(IEnumerable<T> other);
5590

56-
//Check if this set has any elements in common with other
91+
/// <summary>
92+
/// Determines whether the current set is a proper superset of the specified collection. A proper superset is a superset that is not equal to the other set.
93+
/// </summary>
94+
/// <param name="other">The collection to compare to the current set.</param>
95+
/// <returns>
96+
/// <c>true</c> if the current set is a proper superset of the specified collection; otherwise, <c>false</c>.
97+
/// </returns>
98+
bool IsProperSupersetOf(IEnumerable<T> other);
99+
100+
/// <summary>
101+
/// Determines whether the current set has any elements in common with the specified collection.
102+
/// </summary>
103+
/// <param name="other">The collection to compare to the current set.</param>
104+
/// <returns>
105+
/// <c>true</c> if the current set and the specified collection share at least one common element; otherwise, <c>false</c>.
106+
/// </returns>
57107
bool Overlaps(IEnumerable<T> other);
58108

59-
//Check if this set contains the same and only the same elements as other
109+
/// <summary>
110+
/// Determines whether the current set and the specified collection contain the same elements.
111+
/// </summary>
112+
/// <param name="other">The collection to compare to the current set.</param>
113+
/// <returns>
114+
/// <c>true</c> if the current set and the specified collection contain the same elements; otherwise, <c>false</c>.
115+
/// </returns>
60116
bool SetEquals(IEnumerable<T> other);
61117
}
62118
}

0 commit comments

Comments
 (0)