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.
Ongeki_ChibiViewer/Assets/FX/FX_CopyAndShareMat_SetParam.cs

54 lines
1.2 KiB

using System;
using UnityEngine;
namespace FX
{
// Token: 0x02000750 RID: 1872
public class FX_CopyAndShareMat_SetParam : MonoBehaviour
{
// Token: 0x0600300F RID: 12303 RVA: 0x00101C58 File Offset: 0x00101C58
private void Start()
{
foreach (Renderer renderer in this._renderers)
{
if (renderer != null && renderer.material != null)
{
if (this._sharedMaterial == null)
{
this._sharedMaterial = new Material(renderer.material);
}
renderer.material = this._sharedMaterial;
}
}
this._propertyID_ValueName = Shader.PropertyToID(this.valueName);
}
// Token: 0x06003010 RID: 12304 RVA: 0x00101CE0 File Offset: 0x00101CE0
private void Update()
{
if (this._sharedMaterial != null)
{
this._sharedMaterial.SetFloat(this._propertyID_ValueName, this.value);
}
}
// Token: 0x040055C2 RID: 21954
[SerializeField]
private string valueName = "_Opacity";
// Token: 0x040055C3 RID: 21955
[SerializeField]
private float value;
// Token: 0x040055C4 RID: 21956
[SerializeField]
private Renderer[] _renderers;
// Token: 0x040055C5 RID: 21957
private Material _sharedMaterial;
// Token: 0x040055C6 RID: 21958
private int _propertyID_ValueName;
}
}