// TODO TO CHECK: SebL I move allocation from Rebuild() to here, but there was a comment "// Our object can be garbage collected, so need to be allocate here", it is still true ?
// Calling direction Rebuild() here cause this warning:
// "SendMessage cannot be called during Awake, CheckConsistency, or OnValidate UnityEngine.Experimental.ScriptableRenderLoop.HDRenderLoop:OnValidate()"
// Workaround is to declare this dirty flag and call REbuild in Render()
m_Dirty=true;
}
publicoverridevoidRebuild()
{
// We call Cleanup() here because Rebuild() can be call by OnValidate(), i.e when inspector is touch
// Note that module don't need to do the same as the call here is propagated correctly