public static void SelectAsset <T>(string path) where T : Object { var asset = ConverterUtils.LoadResource <T>(path); if (asset) { EditorGUIUtility.PingObject(asset); } }
private static T ReadResource <T>(StyleSheet sheet, StyleProperty property) where T : UnityEngine.Object { if (property.values[0].valueType == StyleValueType.Keyword && sheet.ReadKeyword(property.values[0]) == StyleValueKeyword.None) { return(null); } var path = sheet.ReadResourcePath(property.values[0]); return(ConverterUtils.LoadResource <T>(path)); }