You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace FX
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x02000758 RID: 1880
|
|
|
|
|
public class FX_CopyMat_SetParam : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x06003024 RID: 12324 RVA: 0x00102378 File Offset: 0x00102378
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
|
|
|
|
Renderer component = base.GetComponent<Renderer>();
|
|
|
|
|
this._material = ((!(component != null)) ? null : component.material);
|
|
|
|
|
this._propertyID_ValueName = Shader.PropertyToID(this.valueName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06003025 RID: 12325 RVA: 0x001023BC File Offset: 0x001023BC
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
if (this._material != null)
|
|
|
|
|
{
|
|
|
|
|
this._material.SetFloat(this._propertyID_ValueName, this.value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x040055F2 RID: 22002
|
|
|
|
|
[SerializeField]
|
|
|
|
|
private string valueName = "_Opacity";
|
|
|
|
|
|
|
|
|
|
// Token: 0x040055F3 RID: 22003
|
|
|
|
|
[SerializeField]
|
|
|
|
|
private float value;
|
|
|
|
|
|
|
|
|
|
// Token: 0x040055F4 RID: 22004
|
|
|
|
|
private Material _material;
|
|
|
|
|
|
|
|
|
|
// Token: 0x040055F5 RID: 22005
|
|
|
|
|
private int _propertyID_ValueName;
|
|
|
|
|
}
|
|
|
|
|
}
|