refactor(srp): add managed lifecycle cleanup seams
Invoke managed pipeline disposal and asset runtime cleanup from the native bridge lifecycle. Add Universal renderer and feature cleanup hooks plus regression probes to verify runtime cache teardown semantics.
This commit is contained in:
@@ -5,12 +5,25 @@ namespace XCEngine.Rendering.Universal
|
||||
{
|
||||
public abstract class ScriptableRendererFeature
|
||||
{
|
||||
private bool m_disposed;
|
||||
|
||||
protected ScriptableRendererFeature()
|
||||
{
|
||||
}
|
||||
|
||||
public bool isActive { get; set; } = true;
|
||||
|
||||
internal void ReleaseRuntimeResourcesInstance()
|
||||
{
|
||||
if (m_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ReleaseRuntimeResources();
|
||||
m_disposed = true;
|
||||
}
|
||||
|
||||
public virtual void Create()
|
||||
{
|
||||
}
|
||||
@@ -47,6 +60,10 @@ namespace XCEngine.Rendering.Universal
|
||||
.Rendering_CameraRenderRequestContext_ClearDirectionalShadow(
|
||||
context.nativeHandle);
|
||||
}
|
||||
|
||||
protected virtual void ReleaseRuntimeResources()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user