Bug #5361
Newly spawned parts in editor have prefab pointing to themselves rather than real part prefab
100%
Description
When a part is created in the editor, part.partInfo.partPrefab points to part rather than the real prefab. This is probably an artifact of the way Unity instantiates prefabs - any references to a component in the serialization tree will point to the newly instantiated component rather than the original prefab. This probably also means that part.partInfo points to a copy of the AvailablePart rather than the global instance that PartLoader keeps track of.
This should be a one line fix - after the part is instantiated, either set part.partInfo to the global AvailablePart instance, or set part.partInfo.partPrefab to the global prefab instance - I don't know if it's critical to keep part.partInfo as the global instance or if a copy of that will suffice.
History
#2 Updated by blowfish over 8 years ago
I believe NathanKell fixed this, so it can be closed.
#3 Updated by NathanKell over 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Fixed in 1.0.5.