Search Issue Tracker

Fixed in 4.5.X

Votes

18

Found in

4.3.1f1

Issue ID

581541

Regression

Yes

creating prefab from interactive cloth in the scene crashes the editor

Physics

-

1) I created an object with interactive cloth and a cloth renderer.
I setup the cloth colliders and see it behave like cloth when I play, but if I drag this little item to the prefabs folder, unity will crash.

2) How can we reproduce it using the example you attached
-open attached project
-open scene
-drag Flags object from scene hierarchy into prefab folder in the project explorer
-NOTICE editor crashes

Comments (8)

  1. mkovac

    Jun 15, 2014 22:09

    Don't add ClothRenderer in editor, but rather create it at runtime. Without ClothRenderer component, you can work with prefabs. Presence of InteractiveCloth with assigned mesh is safe, according to my observations.

    ClothRenderer cr = gameObject.AddComponent<ClothRenderer>();
    cr.material = GetComponent<MeshRenderer>().material;
    GetComponent<MeshRenderer>().enabled = false;

  2. Imre

    May 19, 2014 15:33

    Nice one, fix still not released, can we stretch it to full year? Keep up the good work guys!

  3. GerryM

    Feb 22, 2014 11:51

    ARENMOOK's workaround does work fine. Thanks for that!

    You just never must apply the changes when the cloth is acutally activated. Creating the prefab with the inactive cloth GO does actually save the inactive GO in the prefab, then you activate it at runtime via a little script. Or manually for testing (without updating the prefab). Still a bummer, though.

  4. GerryM

    Feb 22, 2014 11:03

    4.3.4f1 and still not fixed! A shame!

    Thanks ARENMOOK for the workaround, however, Unity still does crash when reactivating the cloth and trying to apply the changes.

    Any ideas on how to create a prefab with cloth?

  5. Karsten

    Jan 29, 2014 09:32

    same here, and the workaround from ARENMOOK works good.

  6. ArenMook

    Jan 25, 2014 03:10

    Work-around: disable the game object that has the interactive cloth, then create the prefab / apply the changes. Seems to work when it's disabled.

  7. ArenMook

    Jan 25, 2014 03:07

    100% reproduce-able in my case. Prefab works fine without the cloth. Attach interactive cloth, hit Apply -- crash!

  8. Nesokas

    Jan 14, 2014 01:52

    Any workaround for now?

Add comment

Log in to post comment