Skip to content

Commit cf40950

Browse files
Increase .shadergraph version number when Hybrid Renderer V2 is enabled, to make shader graphs automatically reimport (#16)
* Increase .shadergraph version number when Hybrid Renderer V2 is enabled, to make shader graphs automatically re-import. * Remove double ifdef, just ENABLE_HYBRID_RENDERER_V2 is now consistently used throughout.
1 parent 3471acc commit cf40950

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

com.unity.shadergraph/Editor/Importers/ShaderGraphImporter.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@
1414
namespace UnityEditor.ShaderGraph
1515
{
1616
[ExcludeFromPreset]
17+
#if ENABLE_HYBRID_RENDERER_V2
18+
// Bump the version number when Hybrid Renderer V2 is enabled, to make
19+
// sure that all shader graphs get re-imported. Re-importing is required,
20+
// because the shader graph codegen is different for V2.
21+
// This ifdef can be removed once V2 is the only option.
22+
[ScriptedImporter(100, Extension, 3)]
23+
#else
1724
[ScriptedImporter(32, Extension, 3)]
25+
#endif
26+
1827
class ShaderGraphImporter : ScriptedImporter
1928
{
2029
public const string Extension = "shadergraph";

0 commit comments

Comments
 (0)