- Home /
Question by
magarcan · Mar 29, 2020 at 07:11 PM ·
2dspritesspriterenderer
Get access slice within Sprite Render
I have a sliced sprite. I need get access from my code to the sprite: using UnityEngine; using UnityEngine.UI;
public class spriteAnim : MonoBehaviour
{
SpriteRenderer m_Sprite;
void Start()
{
m_Sprite = GetComponent<SpriteRenderer>();
}
}
I need to get acceso tosee how many slices it have and access each one individually.
Comment
Your answer
Follow this Question
Related Questions
Crop/Mask a Sprite on runtime 0 Answers
Why is my sprite not the original resolution? 2 Answers
I have an animaiton problem about sprite loading. 0 Answers
Sprite Based Score Rendering 1 Answer
What is the best way of creating a modular texture? 0 Answers