Files
BookRPG/Library/PackageCache/com.unity.2d.common@edfe77495b67/Samples~/SpriteAtlas/Runtime/RuntimeSpriteAtlas.cs

29 lines
771 B
C#
Raw Normal View History

2026-07-16 21:49:59 +01:00
using UnityEngine;
using UnityEngine.U2D;
using System.Collections.Generic;
namespace UnityEngine.U2D.Common.Samples
{
public class RuntimeSpriteAtlas : MonoBehaviour
{
// List of Sprites to be packed in Runtime.
public List<Sprite> m_RuntimeAtlasedSprites = new List<Sprite>();
public float multiplier = 1;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
SpriteAtlasCommon.CreateSpriteAtlasAtRuntimeDemo("SimpleRuntimeAtlasSample",
m_RuntimeAtlasedSprites.ToArray(), TextureFormat.RGBA32, 1024, 1024, multiplier);
}
// Update is called once per frame
void Update()
{
}
}
}