Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GameObjectを破棄するときにMaterialも破棄するメソッド
private void DestroyObject ()
{
foreach (Transform t in transform) {
Destroy (t.gameObject.renderer.material);
Destroy (t.gameObject);
}
Destroy (gameObject.renderer.material);
Destroy (gameObject);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment