Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
4
Question by Moxon · Nov 30, 2010 at 06:44 AM · prefablightmapexport

How can you export a prefab as a package and retain a Lightmap (that was generated by Unity)?

Question: Is it possible to export a prefab as a package that can be imported into another project with the Lightmap information intact?

Details: I'm trying to use a Scene which contains a building model that was Lightmapped using Unity. The geometry was made into a prefab and inside this particular Scene, I can drag the prefab into the Hierarchy and it looks fine.

However, when I create a new scene inside this project -- dragging the same prefab out yields a broken (incorrectly lit) model. The same holds true for exporting a packaged prefab and importing in a new project.

The Lightmapped Scene in Question was setup by someone else who is new to Unity so if it doesn't export/package could that mean it is not setup correctly?

We are using Unity 3.0 - if that is of any relevance.

Thanks in advance for any help/tips/suggestions!

Comment
Add comment · Show 1
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 Hugh · Mar 18, 2011 at 11:58 AM 0
Share

I am having the same problem too

5 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by CuddleBeaver · Nov 29, 2011 at 02:13 PM

As far as I can see the lightmap is tied to the scene, so if you try to export the prefab package with all its dependencies, the lightmaps will not be included. Here is what you have to do:

When you make a lightmap inside Unity, a new folder is created in the same folder as the scene with the same name, containing all the 'near' and 'far' lightmaps.

1) Create a new scene in the existing or new project

2) Import the package containing your prefab with all its dependencies.

3) Drag the prefab into the Hierarchy

4) Copy the folder with the lightmaps from the original scene to the one you want to work with.

5) Inside Unity choose Window -> Lightmapping -> Maps

6) Set the 'array size' to the number of lightmaps - if you have 10 near and 10 far lightmaps, set the array size to 10 (if in doubt look in the same place in the original scene). This creates two columns: The first contains the 'far' lightmaps and the second the 'near' lightmaps.

7) Drag each lightmap from the folder to correct place in the collumns. Again - look in the original scene if in doubt.

This works for me.

Comment
Add comment · 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
-1

Answer by _kiu_ · Jul 25, 2012 at 12:10 PM

Same problem here. Please answer. Was trying to move a project from PC to MAC. LIghtmap UV's are messed up now with some models though settings remains unchanged. What can I do?

Comment
Add comment · 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
-2

Answer by hatto · Feb 06, 2011 at 04:34 AM

I have the same question... can we have an answer please

Comment
Add comment · 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
0

Answer by CuddleBeaver · Nov 29, 2011 at 02:02 PM

One more thing. If the lightmapped objects look VERY light, then you have to select each lightmap file, and under Texture Importer -> Texture Type in the Inspector choose 'Lightmap'.

Comment
Add comment · 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
0

Answer by mattdonlan1 · Dec 07, 2011 at 09:58 AM

I have been using this method with some success. I always seem to have a few objects where the light map is re-applied, but incorrectly. It looks as if the auto-unwrap is flipping some normals between scenes. Has anyone else encountered something similar? The only fix seems to be re-running the light map in the new scene.

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Attaching default script to prefab 1 Answer

baking and lightmapping with dynamic level building 0 Answers

Problems importing an asset bundle 1 Answer

How to export Prefab to .FBX file on iOS platform at runtime ? 0 Answers

External Lightmapping tool doesn't export all selected objects 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges