• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by igorpan · Jul 09, 2012 at 01:52 AM · meshprefabmodelimportedseparate

Separating meshes from imported model

I made an airplane model in Blender and imported it into Unity. Now,here is the problem: I made two sets of wings as I plan player to be able to customize plane in game. As you can see the in screenshot both pairs of wings are visible and are overlaping.

The "dirty" way to achieve this would be to just link wing objects to script and make it deactivate "unneeded" wings.

Is there any more elegant way of doing this? I was thinking something like separating wings from the PlayerAircraft prefab and than making a script that would load just needed pair of wings, but still preserving relative position to the body of airplane.

Actualy, I can't seem to find much info about what happens when I import models into Unity. All I do is drag the model onto the scene and make it a prefab so I can use it in other levels. What are the new untextured meshes that appear under the imported file name?blender imported file

scrnshot.png (387.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by crushy · Jul 09, 2012 at 06:21 AM

I think the best way to handle it would be to just have the wings on separate prefabs (and blender files, but that would be up to you). You could use bones on the plane and wings model's to decide where to place the wing meshes in relation to the airplane.

I'm also fairly new to Unity's way of doing things but I would recommend you don't use imported blender files directly as prefabs. Use an empty gameobject, set the blender file as a child and then turn the empty gameobject into a prefab.

As for the meshes I think they're just the individual objects in the blender file, or did I misread your question?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image igorpan · Jul 10, 2012 at 08:25 AM 0
Share

Oh, I see. This approach seems to work a bit better.

If anyone ever gets stuck with the same problem, here is a kind of solution that I use which is parialy based on crushy's answer:

Download "Blender Export Selected" plugin which allows you to export selected objects as new blend file: http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Export_Selected

Now, in my example, open Blender and: 1. Save airplane body without wings as first file 2. Save airplane body with 1 set of wings as second file 3. Save airplane body with second set of wings as third file

~~Important: Apply Position, Scale & Rotation for all objects in each file (Ctrl+A) in object mode~~

Now in Unity: 1. $$anonymous$$ake 3 new empty objects, 1 for each .blend file you created 2. Load those files as children of those 3 objects 3. Thats it! Now as you applied position and rotation and scale to those objects, you can select either pair of wings you want and make airplane object it's parent. It will align perfectly without any bones.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can't create prefab from blender model 1 Answer

duplicate a prefab then change the model? 1 Answer

AssetDatabase.AddObjectToAsset is not persistent? 0 Answers

Find right mesh for collider 1 Answer

Replacing a prefab with a new one to update model changes 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges