Rasagar/Library/PackageCache/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/WaterSurfaceBinder.cs
2024-08-26 23:07:20 +03:00

28 lines
662 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.VFX;
using UnityEngine.VFX.Utility;
using UnityEngine.Rendering.HighDefinition;
public class WaterSurfaceBinder : VFXBinderBase
{
public WaterSurface waterSurface;
public override bool IsValid(VisualEffect component)
{
return waterSurface != null;
}
public override void UpdateBinding(VisualEffect component)
{
waterSurface.SetGlobalTextures();
}
public override string ToString()
{
return string.Format($"Water Surface : '{(waterSurface == null ? "null" : waterSurface.gameObject.name)}'");
}
}