Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to separate one GameObject into multiple pieces

Discussion in 'World Building' started by bassboosted_Tragedy, Jan 2, 2019.

  1. bassboosted_Tragedy

    bassboosted_Tragedy

    Joined:
    Jan 1, 2019
    Posts:
    19
    Sorry for another rookie question, but is it possible to break up a game object into other pieces? If so, how would I go about doing that? I assume this is much easier than I think it is, but I'm just playing it safe as to keep from breaking anything Thanks so much for any help.
     
  2. alussam

    alussam

    Joined:
    May 13, 2018
    Posts:
    15
    You shold use blender for this purpose or other similar application. In unity it is impossible
     
  3. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    653
    Breaking gameobjects into pieces can be done by creating other gameobjects and putting some of the scripts from the first one onto these (if they don't have relative references to certain hierarchy elements). But you're most likely wanting to know how to split geometry/meshes; and that indeed should be done in a 3D-modelling package. It can be done inside unity, but is not recommended and can potentially be very complex, depending on the model.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,262
    Or, depending on what you're trying to do, you may find something in the asset store that does it. There is an asset called (IIRC) "Exploder" which does a pretty good job of exploding most meshes. Or, for Beatron 2000, I wrote a little script that breaks any mesh into its constituent triangles, and sends those flying (for a Tron-like explosion).
     
  5. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    653
    Hi, you can use ProBuilder for this! :)

    1. Drop the mesh into your scene
    2. Open ProBuilder, select the mesh object in your scene, and click "ProBuilderize" (in the future, this will be seamless, sorry!)
    3. Use ProBuilder to select the faces you want to "break off" to a new mesh
    4. Click "Detach Faces" (note: you can click the little "+" next to the button to choose whether the faces become a new GameObject, or SubElement in the same mesh!)

    Hope that helps! Here's more info from the docs:
    ProBuilder: Detach Faces
     
    Chiefmastoras1 likes this.
  6. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    653
    Separete note: as others have mentioned, it is often best to do this in a separate editor (Blender, Maya, etc). Using ProBuilder is (for now) a somewhat clunky method, and will be tough if you have very complex mesh. However, if you just need a quick separation of chunks, and also want the benefit of further editing in-editor, ProBuilder will do the job nicely :)
     
    Chiefmastoras1 and JoeStrout like this.