3 Days Ago
Reduce JSON usage in GameObject.Clone (2) (#1787) We no longer converts the complete GameObject to and from JSON for cloning. JSON is only used as a last resort for complex properties we cannot clone directly. GameObject clones are up to 4 times faster Prefab clones are up to 2 times faster Almost the same as #1781 but includes fixes for a few edge cases: - Match old clone behavior and sort properties when cloning, turns out games can rely on that lol - Match old clone behavior and enable gameobjects before clone process is completed, games could rely on that - Fix edge case where the prefab lookup of clones of prefab instances would not point to the original prefab - Fix edge case when cloning prefabs that contain a nested prefab instance which has a variable that references the outer prefabs root