scripts
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityStandardAssets.ImageEffects
|
||||
{
|
||||
// Token: 0x02000073 RID: 115
|
||||
[RequireComponent(typeof(Camera))]
|
||||
[AddComponentMenu("")]
|
||||
public class ImageEffectBase : MonoBehaviour
|
||||
{
|
||||
// Token: 0x06000142 RID: 322 RVA: 0x0000B681 File Offset: 0x00009A81
|
||||
protected virtual void Start()
|
||||
{
|
||||
if (!SystemInfo.supportsImageEffects)
|
||||
{
|
||||
base.enabled = false;
|
||||
return;
|
||||
}
|
||||
if (!this.shader || !this.shader.isSupported)
|
||||
{
|
||||
base.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000057 RID: 87
|
||||
// (get) Token: 0x06000143 RID: 323 RVA: 0x0000B6BC File Offset: 0x00009ABC
|
||||
protected Material material
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.m_Material == null)
|
||||
{
|
||||
this.m_Material = new Material(this.shader);
|
||||
this.m_Material.hideFlags = HideFlags.HideAndDontSave;
|
||||
}
|
||||
return this.m_Material;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000144 RID: 324 RVA: 0x0000B6F3 File Offset: 0x00009AF3
|
||||
protected virtual void OnDisable()
|
||||
{
|
||||
if (this.m_Material)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(this.m_Material);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040002D0 RID: 720
|
||||
public Shader shader;
|
||||
|
||||
// Token: 0x040002D1 RID: 721
|
||||
private Material m_Material;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user