mirror of
https://github.com/DerTyp7/example-top-down-unity.git
synced 2025-10-29 12:32:09 +01:00
26 lines
532 B
C#
26 lines
532 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class CharSpriteManager : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
List<CharSprite> charSprites = new List<CharSprite>();
|
|
|
|
private void Start()
|
|
{
|
|
LoadIntoList();
|
|
}
|
|
void LoadIntoList()
|
|
{
|
|
CharSprite[] loadedRes = Resources.FindObjectsOfTypeAll<CharSprite>();
|
|
|
|
foreach (CharSprite sprite in loadedRes)
|
|
{
|
|
Debug.Log(sprite.name);
|
|
charSprites.Add(sprite);
|
|
}
|
|
|
|
}
|
|
}
|