Facepunch / sbox-issues

175 stars 12 forks source link

Running Clone() on a GameObject inside a spawned Prefab doesn't clone its components #6313

Open MrBrax opened 3 weeks ago

MrBrax commented 3 weeks ago

Describe the bug

The GameObject hierarchy will get cloned but not components, breaking the prefab works around this but then you lose the prefab source.

To Reproduce

  1. Place gameobject inside prefab
  2. Try to clone it outside the prefab into the scene
  3. Only the gameobject and its children without components will be cloned

Expected behavior

A full normal clone

Media/Files

No response

Additional context

No response

MrBrax commented 3 weeks ago

clone_prefab_child_repro.zip