Search Unity

keeping camera and light in Blender models?

Discussion in 'External Tools' started by Denisowator, Oct 24, 2015.

  1. Denisowator

    Denisowator

    Joined:
    Apr 22, 2014
    Posts:
    918
    So I'm too lazy to delete the camera and light when I export my models from Blender, and when I expand them in Unity as ".fbx" I can see the camera and light as those blue cubes with the white paper sheet. And I'm not sure if they make the models take up a bit more space, or anything like that. So is there any purpose to deleting them before exporting as .fbx if there's nothing but the mesh? Or should I leave them?

    Thanks in advance. :)
     
  2. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    732
    I understand that it doesn't hurt anything to leave them there. The lights and cameras don't do anything in Unity, and I don't think they are taking up any space either. I generally as a habit delete everything in the Blender file when I create it, as I don't ever use the lighting or camera when using Blender with Unity.
     
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    Does Blender have an option to only export selected objects? Just asking, Max has this as an export option.
    Since blender is open source - this would be a nice (and probably pretty simple) feature for the community to add in - if blender currently doesn't have it.
    It'd save a minute per export, and removes a couple steps of human error - like leaving the lights and cameras in the scene on accident. :)
     
  4. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    732
    If you are exporting FBX files directly yourself, the option is there in the export dialog. But if you are simply using the automatic method, putting the blend file into Unity's project folders, then you never use that dialog, and therefore are stuck with however Unity does the FBX export, which I understand includes all the meshes and lights.
     
    theANMATOR2b likes this.
  5. Zamarx

    Zamarx

    Joined:
    Jun 28, 2013
    Posts:
    1
    I figured out how to fix this.

    Find the Unity-BlenderToFBX.py for your version of unity.

    If the "if blender280: section, on the line that reads as the following,
    object_types= {'ARMATURE','CAMERA','LIGHT','MESH','EMPTY'},

    Delete
    'CAMERA','LIGHT'

    Then save the file out, and load/save your blender work and it will be good to go.

    The file for the 2019.3.0a8 version (others will be in a simmilarly named place) was at
    C:\Program Files\Unity\Hub\Editor\2019.3.0a8\Editor\Data\Tools