blob: a663600b7bc0b6c87b2358606603941b5ec82ff5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
using System;
using UnityEngine;
public class XImageEffectBase : MonoBehaviour
{
protected Material material
{
get
{
bool flag = this.m_Material == null;
if (flag)
{
this.m_Material = new Material(this.shader);
this.m_Material.hideFlags = (HideFlags)61;
}
return this.m_Material;
}
}
public Shader shader;
private Material m_Material;
protected virtual void Start()
{
bool flag = !SystemInfo.supportsImageEffects;
if (flag)
{
base.enabled = false;
}
else
{
bool flag2 = !this.shader || !this.shader.isSupported;
if (flag2)
{
base.enabled = false;
}
}
}
protected virtual void OnDisable()
{
bool flag = this.m_Material;
if (flag)
{
UnityEngine.Object.Destroy(this.m_Material);
}
}
}
|