Skip to content

Commit 8add63c

Browse files
authored
Fix suggested names in Secondary Textures tab of Sprite Editor (#6504)
* Add back code that was accidentally removed during a refactor * Fix formating * Fix spelling
1 parent b993d77 commit 8add63c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

com.unity.render-pipelines.universal/Runtime/2D/Renderer2DDataAuthoring.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal override Material GetDefaultMaterial(DefaultMaterialType materialType)
4444
return null;
4545
}
4646

47-
private void OnEnableInEditor()
47+
private void InitializeSpriteEditorPrefs()
4848
{
4949
// Provide a list of suggested texture property names to Sprite Editor via EditorPrefs.
5050
const string suggestedNamesKey = "SecondarySpriteTexturePropertyNames";
@@ -75,6 +75,7 @@ private void ReloadAllNullProperties()
7575

7676
private void Awake()
7777
{
78+
// Initialize Light Blend Styles
7879
if (m_LightBlendStyles != null)
7980
{
8081
for (int i = 0; i < m_LightBlendStyles.Length; ++i)
@@ -104,6 +105,9 @@ private void Awake()
104105
m_LightBlendStyles[3].name = "Additive with Mask";
105106
m_LightBlendStyles[3].blendMode = Light2DBlendStyle.BlendMode.Additive;
106107
m_LightBlendStyles[3].maskTextureChannel = Light2DBlendStyle.TextureChannel.R;
108+
109+
// Initialize Editor Prefs for Sprite Editor
110+
InitializeSpriteEditorPrefs();
107111
}
108112

109113
#endif

0 commit comments

Comments
 (0)