30 lines
495 B
C#
30 lines
495 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
[ExecuteInEditMode]
|
|
[RequireComponent(typeof(Image))]
|
|
public class LightRays2DCanvas : LightRays2DAbstract
|
|
{
|
|
private Image img;
|
|
|
|
protected override void GetReferences()
|
|
{
|
|
img = GetComponent<Image>();
|
|
}
|
|
|
|
protected override Material GetMaterial()
|
|
{
|
|
return Object.Instantiate(img.material);
|
|
}
|
|
|
|
protected override void ApplyMaterial(Material material)
|
|
{
|
|
img.material = material;
|
|
}
|
|
|
|
protected override void Update()
|
|
{
|
|
base.Update();
|
|
}
|
|
}
|