Search Issue Tracker
Fixed
Fixed in 1.8.1
Votes
0
Found in [Package]
1.7.8
1.8.0
Issue ID
UVSB-2437
Regression
No
[IL2CPP] Custom VisualScripting Unit is stripped from build when using IL2CPP and Medium or High managed stripping
Steps to reproduce:
1. Open the attached project "VSStrippingCustomUnit.zip"
2. Build and Run
3. Observe that the screen is Red. Checking the Player log you will see a deserialization error. We are still in Scene 1
3. Open Scripts/NodeTest.cs
4. Uncomment line 6 - "// [Preserve]"
5. Build and Run
6. Observe that the screen is Green. Scene 2 was successfully loaded
Expected: Custom Units that are used in Graphs are not stripped under any circumstances
Actual: When using IL2CPP and Medium/High stripping with a custom Unit, the custom Unit is stripped from the build
Reproducible on: Visual Scripting 1.7.8 - 1.8.0 (2021.3.15f1, 2022.1.24f1, 2022.2.0f1, 2023.1.0a20)
Unable to test on 2020.3.41f1 due to Visual scripting errors when downgrading
Notes:
-When using IL2CPP and Medium/High stripping, the custom Unit (NodeTest.cs) is stripped from the build, unless you add the Preserve attribute to the type
-The attached project has two scenes (Scene1 and Scene2). Scene1 has an embedded script graph in it that loads Scene 2 using a custom Unit. Scene1 has a Camera with a red background, Scene2 has a Camera with a green background. The project is set to use IL2CPP scripting backend and has Managed Stripping Level set to High
-Issue only reproduces with IL2CPP scripting backend
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on GUIState::BeginOnGUI when a Node is opened in a custom graph editor in Play Mode
- USS selector is duplicated when it is added to an element, the action is undone, and then another selector is clicked
- Text and dropdown icon are not aligned in UI Toolkit Samples
- [RenderGraph] SSAO pass in URP RenderGraph uses DontCare flag after changing the Render Scale resulting in a black screen or artifacts
- Player with IL2CPP Scripting Backend crashes when calling Application.Quit() while a thread is running
Resolution Note (fix version 1.8.1):
Fixed in 1.9.0