Commit 1fe7aea
Remove asmref usage from SRP tests
Currently in Unity 6, asmref files are sometimes used to bypass assembly visibility rules. In the future, asmref is no longer allowed so the current usage must be removed (see [RFC](https://docs.google.com/document/d/1SWAG19Ns5gnmbVl4WD-HT0f4DO2UVdiRj_YhX1o7J7E/edit#heading=h.9tfgs0fpr1tb)).
This PR solves the sub-task [Remove asmref usage in SRP tests](https://jira.unity3d.com/browse/XPIPELINE-919), part of the broader task [XPIPELINE-904](https://jira.unity3d.com/browse/XPIPELINE-904) to completely remove asmref usage from SRP code.
SRP tests used asmrefs in 3 places:
1) **HDRP_RuntimeTests project** where the test `012-SVL_Check` contains script `SVLChecker.cs` which needs access to `GenerateShaderVariantList` inside the `com.unity.testframework.graphics` package. However since that type is public, there is no need to inject this script into that assembly. We simply add an asmdef file which contains a reference to the `UnityEngine.TestTools.Graphics` assembly.
2) **VisualEffectGraph_HDRP project** contains an editor-only `TemplateEditor.cs` script which used asmref to inject itself into `Unity.VisualEffectGraph.Editor` assembly. This is unnecessary that assembly is already accessible, we can just wrap the code in `#if UNITY_EDITOR` instead.
3) **UniversalGraphicsTest_2D project** contains an editor-only `AdditionalMenuItems.cs` script which used asmref to inject itself into `UnityEditor.TestTools.Graphics` assembly from `com.unity.testframework.graphics` package. This was also unnecessary, just wrapping the code in `#if UNITY_EDITOR` is enough.
This PR is a follow-up to earlier PRs https://github.cds.internal.unity3d.com/unity/unity/pull/47596 and https://github.cds.internal.unity3d.com/unity/unity/pull/47609.1 parent 7b8d780 commit 1fe7aea
9 files changed
Lines changed: 7 additions & 37 deletions
File tree
- Tests/SRPTests/Projects
- HDRP_RuntimeTests/Assets
- HDRPDefaultResources
- Scenes
- 012-SVL_Check
- UniversalGraphicsTest_2D/Assets/CommonAssets/Scripts
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
| 3 | + | |
| 4 | + | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
| |||
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
| 86 | + | |
Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 0 additions & 8 deletions
This file was deleted.
0 commit comments