コード例 #1
0
        private void ChecklistAssetsGUI(ChecklistItem check, List <string> paths)
        {
            if (!paths.Any <string>())
            {
                return;
            }
            this.Indent(2);
            check.FoldoutPaths = EditorGUILayout.Foldout(check.FoldoutPaths, " Related Assets:");
            if (GUILayout.Button("Select All", new GUILayoutOption[] { GUILayout.MaxWidth(80f), GUILayout.MinWidth(80f), GUILayout.MaxHeight(20f), GUILayout.MinHeight(20f) }))
            {
                IEnumerable <UnityEngine.Object> objs =
                    from f in paths
                    select AssetDatabase.LoadMainAssetAtPath(f);

                Selection.objects = objs.ToArray <UnityEngine.Object>();
                EditorGUIUtility.PingObject(Selection.activeObject);
            }
            if (check.FoldoutPaths)
            {
                foreach (string path in paths)
                {
                    GUILayout.EndHorizontal();
                    this.Indent(3);
                    UnityEngine.Object obj = AssetDatabase.LoadMainAssetAtPath(path);
                    EditorGUILayout.ObjectField(obj, typeof(UnityEngine.Object), false, new GUILayoutOption[0]);
                }
            }
            GUILayout.EndHorizontal();
        }
コード例 #2
0
ファイル: ModelScanner.cs プロジェクト: JeReT/AssetStoreTools
 public ModelScanner(ChecklistItem prefabsCheck, ChecklistItem mixamoCheck, ChecklistItem animationCheck, ChecklistItem orientationCheck)
 {
     this.prefabsCheck     = prefabsCheck;
     this.mixamoCheck      = mixamoCheck;
     this.animationCheck   = animationCheck;
     this.orientationCheck = orientationCheck;
 }
コード例 #3
0
 public PrefabScanner(ChecklistItem colliderItem, ChecklistItem transformItem, ChecklistItem emptyItem, ChecklistItem lodsItem)
 {
     this.colliderCheck  = colliderItem;
     this.transformCheck = transformItem;
     this.emptyCheck     = emptyItem;
     this.lodsCheck      = lodsItem;
 }
コード例 #4
0
ファイル: Checklist.cs プロジェクト: JeReT/AssetStoreTools
        private void AddCheck(ValidatorData.CheckItemData data)
        {
            ChecklistItem checklistItem = ScriptableObject.CreateInstance <ChecklistItem>();

            checklistItem.Init(data);
            AssetDatabase.AddObjectToAsset(checklistItem, ValidatorData.MANAGER_PATH);
            this.Checks.Add(checklistItem);
        }
コード例 #5
0
 private void ChecklistMessageGUI(ChecklistItem check, string message)
 {
     this.Indent(2);
     GUILayout.EndHorizontal();
     this.Indent(3);
     EditorGUILayout.LabelField(message, new GUIStyle(EditorStyles.textArea)
     {
         wordWrap = true,
         richText = true
     }, new GUILayoutOption[0]);
     GUILayout.EndHorizontal();
 }
コード例 #6
0
        private void ChecklistItemGUI(ChecklistItem check)
        {
            if (!check.Active)
            {
                return;
            }
            this.Indent(1);
            GUIStyle gUIStyle = new GUIStyle(EditorStyles.foldout);
            string   title    = ValidatorData.ItemData[(int)check.Type].Title;

            check.Foldout = EditorGUILayout.Foldout(check.Foldout, string.Concat(" ", title), gUIStyle);
            GUILayout.EndHorizontal();
            if (check.Foldout)
            {
                string message = ValidatorData.ItemData[(int)check.Type].Message;
                if (check.Failed)
                {
                    message = string.Concat("<color=#", ColorUtility.ToHtmlStringRGB(GUIUtil.ErrorColor), ">An exception occurred when performing this check! Please view the Console for more information.</color>\n\n", message);
                }
                this.ChecklistMessageGUI(check, message);
                this.ChecklistAssetsGUI(check, check.AssetPaths);
            }
        }
コード例 #7
0
 public StandardAssetScanner(ChecklistItem check)
 {
     this.checklistItem = check;
 }
コード例 #8
0
 public ReferenceScanner(ChecklistItem check)
 {
     this.checklistItem = check;
 }
コード例 #9
0
 public ExtensionScanner(ChecklistItem check, string[] extensions, string[] exclusions = null)
 {
     this.extensions    = extensions;
     this.checklistItem = check;
     this.exclusions    = exclusions;
 }
コード例 #10
0
 public TextureScanner(ChecklistItem check)
 {
     this.checklistItem = check;
 }