Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Large objects in Unity

Discussion in 'General Graphics' started by GamesOnAcid, Jan 25, 2016.

  1. GamesOnAcid

    GamesOnAcid

    Joined:
    Jan 11, 2016
    Posts:
    280
    So, I was making a map for my game in sketchup. I converted it to an FBX and imported it into Unity. Problem is, the map is really big, and there are a lot of objects in the game. Unity is giving me an error that says:
    Too many objects of type GameObject in file
    Is there any way to turn down the number of GameObjects in the map I am importing to make it small enough to load? Any help appreciated, thanks
     
  2. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    If the map has lots of meshes that you know you won't have to move around, try to combine them into one mesh to lower the things that unity will make into individual game objects. That will also help with draw calls.
    For example if you have a hut with 4 walls and a roof that are separate meshes, combine those into one mesh in the 3D modeling program.
     
    theANMATOR2b likes this.
  3. GamesOnAcid

    GamesOnAcid

    Joined:
    Jan 11, 2016
    Posts:
    280
    Alright, is that possible in Sketchup, because it only renders as an empty game object currently on Unity. I'll read up on it today however. Thanks for the info.
     
  4. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    I'm not familiar with sketchup at all i'm afraid.
     
  5. Rombie

    Rombie

    Joined:
    Feb 18, 2015
    Posts:
    282
    To combine separate mesh in sketchup:

    Either manually select everything you want to merge; or hit Ctrl-A to autoselect all mesh within a project. Right click on the now highlighted objects and choose "Explode" on the drop down. Keep repeating this step till all groups are worked through and the explode option can no longer be selected.
    Right click again and on the drop down there will be an option "Make into a group" this will put all mesh within one group; grouping all mesh so it's a bit easier to work with.

    I also answered this question in the thread you posted in the external tools section; that answer might help you with your issue.

    Best of luck!
     
  6. GamesOnAcid

    GamesOnAcid

    Joined:
    Jan 11, 2016
    Posts:
    280
    Thank you, this should work. I merged everything into one mesh, and hopefully it renders as one object.