scripts
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UnityEngine.Experimental.Rendering
|
||||
{
|
||||
// Token: 0x020004E1 RID: 1249
|
||||
public abstract class RenderPipelineAsset : ScriptableObject, IRenderPipelineAsset
|
||||
{
|
||||
// Token: 0x06003C05 RID: 15365 RVA: 0x00069A48 File Offset: 0x00067C48
|
||||
public void DestroyCreatedInstances()
|
||||
{
|
||||
foreach (IRenderPipeline renderPipeline in this.m_CreatedPipelines)
|
||||
{
|
||||
renderPipeline.Dispose();
|
||||
}
|
||||
this.m_CreatedPipelines.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x06003C06 RID: 15366 RVA: 0x00069AB0 File Offset: 0x00067CB0
|
||||
public IRenderPipeline CreatePipeline()
|
||||
{
|
||||
IRenderPipeline renderPipeline = this.InternalCreatePipeline();
|
||||
if (renderPipeline != null)
|
||||
{
|
||||
this.m_CreatedPipelines.Add(renderPipeline);
|
||||
}
|
||||
return renderPipeline;
|
||||
}
|
||||
|
||||
// Token: 0x06003C07 RID: 15367
|
||||
protected abstract IRenderPipeline InternalCreatePipeline();
|
||||
|
||||
// Token: 0x06003C08 RID: 15368 RVA: 0x00069AE0 File Offset: 0x00067CE0
|
||||
protected IEnumerable<IRenderPipeline> CreatedInstances()
|
||||
{
|
||||
return this.m_CreatedPipelines;
|
||||
}
|
||||
|
||||
// Token: 0x06003C09 RID: 15369 RVA: 0x00069AFC File Offset: 0x00067CFC
|
||||
private void OnValidate()
|
||||
{
|
||||
this.DestroyCreatedInstances();
|
||||
}
|
||||
|
||||
// Token: 0x06003C0A RID: 15370 RVA: 0x00069B08 File Offset: 0x00067D08
|
||||
private void OnDisable()
|
||||
{
|
||||
this.DestroyCreatedInstances();
|
||||
}
|
||||
|
||||
// Token: 0x04001236 RID: 4662
|
||||
private readonly List<IRenderPipeline> m_CreatedPipelines = new List<IRenderPipeline>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user