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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 1.8.1):
Fixed in 1.9.0