- Home /
Question by
throwaway123321 · Apr 16, 2020 at 09:54 PM ·
destroydestroy object
Does calling Destroy(material) destroy the texture as well?
I create a Texture with new, and a Material with new, and assign the texture to the material like the following:
Texture2D texture = image.ToTexture();
Material material = new Material(defaultShader)
{
mainTexture = texture
};
Do I need to also call Destroy(texture), or is Destroy(material) sufficient and it will remove them both?
Comment
Your answer
Follow this Question
Related Questions
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers
Enemy Spawner help 1 Answer
Why would a GameObject delete itself. 0 Answers