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
0
Question by grafikzeug · Aug 08, 2013 at 01:50 PM · meshc4d

How do find all meshes my Project?

Hey guys,

after importing the latest Version of our project, some of the meshes went missing. I found out that it had something to do with the naming of the meshes within the imported c4d file. (in this case I used a "+" in the name of some of the meshes and when Unity imported them, each "+" was renamed to "_" and went missing.)

Now to make sure the project is clean, I will have to find all the meshes that have a "+" within the mesh of their c4d-file, but since unity renamed them on import, I can't look for them by just searching for "+" in the project. Now alternatively, I could also find all the objects that have a "Mesh: Missing (Mesh)" in their "Mesh Filter" component. But since the project is really big by now, doing this manually would take forever. Is there a simple editor script that can go through the project and list every object with a missing mesh property?

Thanks a lot for your help guys!

Cheers Felix

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
1

Answer by robertbu · Aug 08, 2013 at 02:59 PM

I ran a quick test. This editor script will give you the name of any game object that has a missing mesh.

 using UnityEngine;
 using UnityEditor;
 public class FindMissingMeshes : EditorWindow {
  
     [MenuItem("Window/FindMissingMeshes")]
     public static void ShowWindow() {
         EditorWindow.GetWindow(typeof(FindMissingMeshes));
     }
  
     public void OnGUI() {
         if (GUILayout.Button("Find Missing Meshes")) {
             FindMissing();
         }
     }
     
     private static void FindMissing() {
            MeshFilter[] amf = (MeshFilter[])Resources.FindObjectsOfTypeAll(typeof(MeshFilter));
         foreach (MeshFilter mf in amf) {
             if (!AssetDatabase.Contains(mf.mesh)) 
                 Debug.Log ("Missing mesh on game object: "+mf.name);
         }
  
     }
 }
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 grafikzeug · Aug 15, 2013 at 07:54 PM 0
Share

Hey man! Thanks a bunch! This will help me big time!!

Cheers Felix

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

15 People are following this question.

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

Related Questions

C4D Animation Import difficulties 0 Answers

Selecting all Vertices of a Specific Color 1 Answer

Cant put material of Unity on mesh created with C4D 1 Answer

How to Calculate UV Map and Tangents for Unity Mesh 1 Answer

Texture problems while exporting from c4d 0 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