Hello, I made SpriteSheet by using TexturePacker.
And I try to use Sprite in the SpriteSheet. But, Sprite Value is Null.
using UnityEngine;
using System.Collections;
public class TileMap : MonoBehaviour {
public GameObject tile;
void Start () {
(GameObject.Instantiate(tile) as GameObject).GetComponent<SpriteRenderer>().sprite = Resources.Load<Sprite>("character");
}
void Update () {
}
}
How Can I get a sprite from Sheet in the script?
sorry to unskilled in English…