- Validator: Added asset validators with material texture and shader validation
- Validator: Added option to enable/disable certain validators - Project Settings: Fixed issue, where changes weren't always saved - Unity: Removed deprecated warnings in Unity 6.4
This commit is contained in:
parent
01ac17a078
commit
dd55a87740
30 changed files with 716 additions and 38 deletions
|
|
@ -1,7 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Module.ProjectValidator.Editor
|
||||
{
|
||||
|
|
@ -29,6 +31,22 @@ namespace Module.ProjectValidator.Editor
|
|||
return list.ToArray();
|
||||
}
|
||||
|
||||
public static Object[] LoadAllAssets(Type type)
|
||||
{
|
||||
var guids = AssetDatabase.FindAssetGUIDs($"a:assets t:{type.Name}");
|
||||
var list = new List<Object>(guids.Length);
|
||||
|
||||
foreach (var guid in guids)
|
||||
{
|
||||
var asset = AssetDatabase.LoadAssetByGUID(guid, type);
|
||||
|
||||
if (asset != null)
|
||||
list.Add(asset);
|
||||
}
|
||||
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
internal static GUID GetAssetGuid(Object obj)
|
||||
{
|
||||
var assetPath = string.Empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue