rabidus-test/Assets/Amazing Assets/Advanced Dissolve/Scripts/Helper/AdvancedDissolveTransformSc...

30 lines
795 B
C#
Raw Permalink Normal View History

2023-09-18 20:09:22 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using AmazingAssets.AdvancedDissolve;
namespace AmazingAssets.AdvancedDissolve
{
[ExecuteAlways]
public class AdvancedDissolveTransformScaleToRadius : MonoBehaviour
{
public AdvancedDissolveGeometricCutoutController geometricCutoutController;
public AdvancedDissolve.AdvancedDissolveKeywords.CutoutGeometricCount countID;
void Update()
{
if (geometricCutoutController == null)
return;
float radius = transform.lossyScale.x * .5f;
geometricCutoutController.SetTargetStartPointTransform(countID, transform);
geometricCutoutController.SetTargetRadius(countID, radius);
}
}
}