Flatkit 추가 및 설정

This commit is contained in:
2026-01-25 11:27:33 +09:00
parent 05233497e7
commit cf16910a32
1938 changed files with 408633 additions and 244 deletions

View File

@@ -0,0 +1,27 @@
using UnityEngine;
namespace FlatKit {
public class UvScroller : MonoBehaviour {
public Material targetMaterial;
public float speedX = 0f;
public float speedY = 0f;
private Vector2 offset;
private Vector2 initOffset;
void Start() {
offset = targetMaterial.mainTextureOffset;
initOffset = targetMaterial.mainTextureOffset;
}
void OnDisable() {
targetMaterial.mainTextureOffset = initOffset;
}
void Update() {
offset.x += speedX * Time.deltaTime;
offset.y += speedY * Time.deltaTime;
targetMaterial.mainTextureOffset = offset;
}
}
}