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
1
Question by pickledzebra · Jul 11, 2010 at 11:28 AM · meshcombineeditmode

CombineChildren not working under ExecuteInEditMode()

I have a set of prefab objects that I create in a scene. Then I perform a set of operations on them and would like to save the result to a new prefab.

I thought that using ExecuteInEditMode() was my solution, and, in fact, it works very well in nearly every respect. The script works as intended in runtime, so I assume the code itself is fine.

However, CombineChildren doesn't appear to do anything in this mode.

The CombineChildren script shows up as attached to the correct parent objects, but the child objects are still all independent and there is no combined mesh as there is if the script is run in game/runtime.

any ideas would be appreciated!

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 spinaljack · Jul 12, 2010 at 10:57 PM 0
Share

Why do you need combine children to work in edit mode?

1 Reply

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

Answer by Flynn · Jan 17, 2011 at 11:07 AM

If you added the script BEFORE adding the children, the script had already executed the children combine, making it too late. To remedy this, just remove, and re-add the script.

If this is not the case, then it appears to be a bug. The only solution is to:

Run this code in play mode, without execute in edit mode. Drag the new combined children onto your desired prefab, and then exit play mode. This will most definitely work, and is how I used to do it before I learned of ExcecuteInEditMode.

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

No one has followed this question yet.

Related Questions

Delete tris from mesh without consequences? 2 Answers

Combine Children and Unity 4.0.1 not working the same as in previous version 0 Answers

CombineMeshes Error on Run-time Meshes 2 Answers

Combining meshes (different materials) together for rotation/translation 1 Answer

Combine multiple rigidbodies? 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