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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Resolution Note (fix version 1.8.1):
Fixed in 1.9.0