简体   繁体   中英

How to clone destroyed objects in unity3D?

I made a wall that get destroyed when the character touches it and then he can keep walking. I want to create the same wall after few seconds or after the character pass it , anyone knows how do it ? ( I already tried it with a timer and OnCollisionExit but it didn't seem to work)

  1. store a reference to your object (probably in your player script)
  2. Set it to inactive with GameObject.SetActive(false) when you're
  3. ready (your OnCollisionExit or timer function), set it to active.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM