Destroying assets is not permitted to avoid data loss | Unity resolve
Destroying assets is not permitted to avoid data loss
Example of error :
Function WaitAndDie() { var clonedeathEffect = Instantiate(deathEffect, transform.position, Quaternion.identity); yield return new WaitForSeconds (dieDelay); Destroy(deathEffect);
}
you get the error because this line :
Destroy(deathEffect);
To resolve the error you need to use this method var clonedeathEffect like this :
Function WaitAndDie() { var clonedeathEffect = Instantiate(deathEffect, transform.position, Quaternion.identity); yield return new WaitForSeconds (dieDelay);
Destroy(clonedeathEffect);
}
destroying assets is not permitted to avoid data loss texture
destroying a gameobject inside a prefab instance is not allowed
unity destroy
unity instantiate and destroy
unity destroyimmediate
destroy scene unity
waitforseconds unity
unity destroy component destroying a gameobject inside a prefab instance is not allowed
unity destroyimmediate
Function WaitAndDie()
{
var clonedeathEffect = Instantiate(deathEffect, transform.position, Quaternion.identity);
yield return new WaitForSeconds (dieDelay);
Destroy(deathEffect);
}
Function WaitAndDie()
{
var clonedeathEffect = Instantiate(deathEffect, transform.position, Quaternion.identity);
yield return new WaitForSeconds (dieDelay);
Destroy(clonedeathEffect);
}
Post a Comment
image video quote pre code