You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
619 B
C#

2 months ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace AllIn1SpriteShader
{
public class DemoRepositionExpositor : MonoBehaviour
{
[SerializeField] private float paddingX = 10f;
[ContextMenu("RepositionExpositor")]
private void RepositionExpositor()
{
int i = 0;
Vector3 tempLocalPos = Vector3.zero;
foreach (Transform child in transform)
{
tempLocalPos.x = i * paddingX;
child.localPosition = tempLocalPos;
i++;
}
}
}
}