Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Duplicate rod is inheriting attached particle from original
#1
When I duplicate an ObiRod blueprint and increase its length and add to the ObiRod of the new object with two attachments, the attachment position remains that of the original object even after adjusting the attaching objects

The small cable in the middle is the original cable.
The large cable with a dropped part is duplicated from the original with only the blueprint and the position of the connectors changed.
The large cable that is working was made from scratch using the same blueprint as the previous one.

[Image: yhhMHrT.png]
Reply
#2
Is this cable a prefab by any chance? we recently fixed a bug that caused prefab overrides to reset attachment particle indices at runtime. The fix should be out next week.

Let me know if this is the case, so I can make the patch available to you.

kind regards,
Reply
#3
(20-07-2021, 08:35 AM)josemendez Wrote: Is this cable a prefab by any chance? we recently fixed a bug that caused prefab overrides to reset attachment particle indices at runtime. The fix should be out next week.

Let me know if this is the case, so I can make the patch available to you.

kind regards,

Yes, it's a prefab and I believe it's the same bug, because I tested it after getting the prefab, changing the length and changing the particle names, then I went back to the original names and redefined it in the "particle group" of the attachment and it worked, me seems to be this bug
Reply
#4
(20-07-2021, 01:24 PM)willmedeiros Wrote: Yes, it's a prefab and I believe it's the same bug, because I tested it after getting the prefab, changing the length and changing the particle names, then I went back to the original names and redefined it in the "particle group" of the attachment and it worked, me seems to be this bug

If that's the case, go to ObiParticleAttachmentEditor.cs, line 109, add a call to PrefabUtility.RecordPrefabInstancePropertyModifications(). Should look like this:


Quote:void OnParticleGroupSelected(object index)
{
Undo.RecordObject(attachment, "Set particle group");
attachment.particleGroup = index as ObiParticleGroup;
PrefabUtility.RecordPrefabInstancePropertyModifications(attachment);
}

After this change, select the offending attachment and re-select the particle group (click the particle group dropdown, and just select the same particle group). That should fix the issue.

Let me know how it goes!
Reply
#5
(20-07-2021, 01:27 PM)josemendez Wrote: If that's the case, go to ObiParticleAttachmentEditor.cs, line 109, add a call to PrefabUtility.RecordPrefabInstancePropertyModifications(). Should look like this:



After this change, select the offending attachment and re-select the particle group (click the particle group dropdown, and just select the same particle group). That should fix the issue.

Let me know how it goes!

worked perfectly! thank you so much for the support!
Reply