- Home /
How to get a texture from a child sprite?
When I use the Texture2D property of a child sprite it gives me the Texture2D of the entire sprite.
foreach (Sprite t in (AssetDatabase.LoadAllAssetsAtPath(ToAssets(p))).OfType<Sprite>())
{
(t.texture); //Gives me the entire texture rather than the part of the texture I want
}
Comment
Best Answer
Answer by Bill9009 · May 25, 2017 at 12:10 AM
Thanks for the help and support. I figured out the answer. I got it from Convert Sprite Image to Texture. Just make sure the Read/Write on the "multiple" Sprite is enabled.