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(); }
public ModelScanner(ChecklistItem prefabsCheck, ChecklistItem mixamoCheck, ChecklistItem animationCheck, ChecklistItem orientationCheck) { this.prefabsCheck = prefabsCheck; this.mixamoCheck = mixamoCheck; this.animationCheck = animationCheck; this.orientationCheck = orientationCheck; }
public PrefabScanner(ChecklistItem colliderItem, ChecklistItem transformItem, ChecklistItem emptyItem, ChecklistItem lodsItem) { this.colliderCheck = colliderItem; this.transformCheck = transformItem; this.emptyCheck = emptyItem; this.lodsCheck = lodsItem; }
private void AddCheck(ValidatorData.CheckItemData data) { ChecklistItem checklistItem = ScriptableObject.CreateInstance <ChecklistItem>(); checklistItem.Init(data); AssetDatabase.AddObjectToAsset(checklistItem, ValidatorData.MANAGER_PATH); this.Checks.Add(checklistItem); }
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(); }
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); } }
public StandardAssetScanner(ChecklistItem check) { this.checklistItem = check; }
public ReferenceScanner(ChecklistItem check) { this.checklistItem = check; }
public ExtensionScanner(ChecklistItem check, string[] extensions, string[] exclusions = null) { this.extensions = extensions; this.checklistItem = check; this.exclusions = exclusions; }
public TextureScanner(ChecklistItem check) { this.checklistItem = check; }