Skip to content

Commit 838e53e

Browse files
committed
OnValidate now working and not necesary to call CleanUp on disable anymore.
1 parent 4d7cb6d commit 838e53e

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,9 @@ public TilePass.LightLoop tilePassLightLoop
226226
TextureCache2D m_CookieTexArray;
227227
TextureCacheCubemap m_CubeCookieTexArray;
228228

229-
private void OnEnable()
229+
private void OnValidate()
230230
{
231-
// TODO: Design workaround for OnValidate being missing on ScriptableObject
232231
m_Dirty = true;
233-
Rebuild();
234-
}
235-
236-
private void OnDisable()
237-
{
238-
// TODO: Rework ScriptableRenderLoop Lifecycle
239-
//CleanUp();
240232
}
241233

242234
public override void Rebuild()

Assets/ScriptableRenderLoop/fptl/FptlLighting.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,16 @@ static void CreateRenderLoopFPTL()
113113
private Texture2D m_LightAttentuationTexture;
114114
private int m_shadowBufferID;
115115

116-
public override void Initialize()
116+
private void OnValidate()
117117
{
118118
Rebuild();
119119
}
120120

121-
private void OnEnable()
121+
public override void Initialize()
122122
{
123123
Rebuild();
124124
}
125125

126-
private void OnDisable()
127-
{
128-
// TODO: Rework ScriptableRenderLoop Lifecycle
129-
//CleanUp();
130-
}
131-
132126
public override void Cleanup()
133127
{
134128
// RenderLoop.renderLoopDelegate -= ExecuteRenderLoop;

0 commit comments

Comments
 (0)