- Home /
Delete a Decal Projector at Runtime
I have a script on a prefab as follows:
public GameObject Random1;
// Use this for initialization
void Start () {
rigidbody.useGravity = false;
rigidbody.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezePositionZ;
if(Random1 != null)
{
Destroy(Random1);
}
}
I have Random1 linked to a decal projector (in the editor) that is a child of the prefab this script is attached to. I want to Destroy() the decal projector at runtime, is this possible?
Thanks
Comment
Your answer
Follow this Question
Related Questions
HDRP Decal Projector doesn't show in game view 0 Answers
Texturing Basics - Adding detail to materials while condensing your UV map 0 Answers
LWRP - Placing markers on terrain and gameobject dynamically 0 Answers
Is it possible to make an image sequence into an animated normal map? 0 Answers
Decals only appear on materials that have been selected in the editor 0 Answers