-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [1.9.0] - 2023-08-01 ### Fixed - Fixed code for custom nodes being stripped in AOT builds when Managed Stripping Level is set to High [UVSB-2439](https://issuetracker.unity3d.com/product/unity/issues/guid/UVSB-2437) - 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) - 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)
- Loading branch information
Unity Technologies
committed
Aug 1, 2023
1 parent
db591b9
commit e890b3c
Showing
57 changed files
with
930 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,3 +198,4 @@ | |
|
||
* [Developer's guide](vs-developers-guide.md) | ||
|
||
* [Known Issues](vs-editor-script-issues.md) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Known Issues: Unity Editor script functions | ||
|
||
If you use nodes that use Unity Editor script functions in any of the Visual Scripting graphs in your project, it causes errors when you try to build your project. | ||
|
||
## Cause of the build errors | ||
|
||
Unity Visual Scripting (UVS) doesn't support preprocessor directives, so the use of Unity Editor script functions within graphs isn't possible. However, these functions can appear as node options within UVS because UVS uses C# reflection to generate nodes for your project based on your included assemblies. If you add one of these Unity Editor script nodes to a graph that's used in a build of your project, Unity generates an error when it attempts to build the project. An error message of the following format is displayed in the Unity Console: | ||
|
||
`/<ProjectPath>/<CSharpFile>.cs: error CS0103: The name '<MissingApiName>' does not exist in the current context.` | ||
|
||
The following code sample is an example of preprocessor directives for Unity Editor scripts : | ||
``` | ||
#if UNITY_EDITOR | ||
public static List<Type> GetAllVolumeComponents() | ||
{ | ||
// TypeCache is only accessible in UnityEditor. | ||
// If you instantiate a GetAllVolumeComponents node in a graph | ||
// it prevents the project from being built. | ||
return TypeCache.GetTypesDerivedFrom<VolumeComponent>().ToList(); | ||
} | ||
#endif | ||
``` | ||
|
||
## Find flagged packages | ||
|
||
Packages that contain editor scripts are flagged with a warning icon in the Node Library section of the Visual Scripting tab in the Project Settings window. | ||
|
||
To find the affected packages, do the following: | ||
|
||
1. Go to **Edit** > **Project Settings**. | ||
1. In the Project Settings window, select the **Visual Scripting** tab. | ||
1. On the Visual Scripting tab expand the **Node Library** section. </br> | ||
A yellow warning flag is displayed next to any affected packages as shown in the following screenshot. | ||
![An example of a flagged package in the Visual Scripting project settings tab](images/vs-flagged-assembly.png) | ||
|
||
## Resolution | ||
|
||
To resolve this issue, go through your graphs and replace nodes that correspond to the API mentioned in the error message until you find the error no longer occurs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
Editor/SettingsProvider/ProjectSettings/LinkerPropertyProviderSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace Unity.VisualScripting | ||
{ | ||
internal class LinkerPropertyProviderSettings | ||
{ | ||
private readonly PluginConfigurationItemMetadata _linkerSettings; | ||
|
||
private const string Title = "Linker generation settings"; | ||
|
||
private readonly GUIContent[] _toggleTargetsLabel = | ||
{ | ||
new GUIContent("Scan graph assets"), | ||
new GUIContent("Scan scenes"), | ||
new GUIContent("Scan prefabs") | ||
}; | ||
|
||
private Array _options = Enum.GetValues(typeof(BoltCoreConfiguration.LinkerScanTarget)); | ||
private List<bool> _settings; | ||
|
||
public LinkerPropertyProviderSettings(BoltCoreConfiguration coreConfig) | ||
{ | ||
_linkerSettings = coreConfig.GetMetadata(nameof(LinkerPropertyProviderSettings)); | ||
|
||
_settings = new List<bool>((List<bool>)_linkerSettings.value); | ||
} | ||
|
||
private void SaveIfNeeded() | ||
{ | ||
var settings = (List<bool>)_linkerSettings.value; | ||
|
||
if (!_settings.SequenceEqual(settings)) | ||
{ | ||
_linkerSettings.value = new List<bool>(_settings); | ||
|
||
_linkerSettings.SaveImmediately(); | ||
} | ||
} | ||
|
||
public void OnGUI() | ||
{ | ||
GUILayout.Space(5f); | ||
|
||
GUILayout.Label(Title, EditorStyles.boldLabel); | ||
|
||
GUILayout.Space(5f); | ||
|
||
var label = "Scan for types to be added to link.xml"; | ||
|
||
GUILayout.BeginHorizontal(EditorStyles.helpBox); | ||
GUILayout.Label(EditorGUIUtility.IconContent("console.infoicon"), GUILayout.ExpandWidth(true)); | ||
GUILayout.Box(label, EditorStyles.wordWrappedLabel); | ||
GUILayout.EndHorizontal(); | ||
|
||
GUILayout.Space(5f); | ||
|
||
foreach (var option in _options) | ||
{ | ||
_settings[(int)option] = GUILayout.Toggle(_settings[(int)option], _toggleTargetsLabel[(int)option]); | ||
GUILayout.Space(5f); | ||
} | ||
|
||
SaveIfNeeded(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Editor/SettingsProvider/ProjectSettings/LinkerPropertyProviderSettings.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-122 KB
Editor/VisualScripting.Core/Dependencies/DotNetZip/Unity.VisualScripting.IonicZip.dll.mdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.