|
I am getting ready to launch a new game and am going over it with a fine toothed comb to make sure everything is correct. In the editor, a script that has been assigned to an object, but subsequently deleted has the string "Missing (Mono Script)" where the script class/filename should be. Is it possible to search a project to find all missing scripts? I have tried using GetComponents, but do not know what I should put into the type field. I have also tried using GetComponent with a null string, "Missing, and "Missing (Mono Script)" as the parameter, but that always returns null. Since I do not know the name of the missing scripts, it makes the problem more difficult. Is there any other approaches to try, other than hiring an intern?
(comments are locked)
|
|
Can be done with some editor scripting: You need to search all game objects for empty (null) components. This can e.g. be done like this: Select all objects you want to search for missing scripts and click. I reposted this into the wiki: http://www.unifycommunity.com/wiki/index.php?title=FindMissingScripts
Mar 08 '10 at 08:40 PM
lowbloodsugar
(comments are locked)
|
|
That works great! Here are the small changes I had to make to get it to work on my machine (Added using directive and changed MenuItem entry to have window prefix). Save the script as "FindMissingScripts.js" Clement
using UnityEngine;
using UnityEditor;
public class FindMissingScripts : EditorWindow {
@Clement, please don't repost the same answers small changes can be done on the original answer if you simply ask via comment.
Mar 09 '10 at 05:03 AM
Lipis
then what are we going to do with this script,put where i mean? need to attach to any or do what,as cannot attach to Missing (Mono Script)"
Jan 13 '12 at 01:30 AM
wenhua
where does position:5 means?????
Jan 13 '12 at 01:44 AM
wenhua
i think Missing (Mono Script)" is not in none of those script,So how any solution?
Jan 13 '12 at 01:54 AM
wenhua
(comments are locked)
|

I don't think there is way to search for that... Can I give points for the intern joke? :-)