/// <summary> /// アセットフィールド /// </summary> private void AssetField(Rect position, LinkAnalyzer.AssetUniqueID uniqueID) { #if SEARCH_TOOLS_DEBUG if (displayGUID) { var label = uniqueID.fileID.ToString("D9") + ":" + uniqueID.guid; EditorGUI.LabelField(position, label); } else //[fallthrough] #endif { var obj = LinkAnalyzer.ConvertUniqueIDToObject(uniqueID); CustomGUI.ObjectLabelField(position, obj); } var include = linkAnalyzer.IsInclude(uniqueID); position.xMin = position.xMax - position.height; GUI.DrawTexture(position, includeIcons[(int)include]); var assetBundle = (linkAnalyzer.GetIncludeStateFlags(uniqueID) & LinkAnalyzer.IncludeStateFlags.AssetBundle) != 0; if (assetBundle) { position.x -= position.width; GUI.DrawTexture(position, assetBundleIcons[(int)LinkAnalyzer.IsIncludeReturn.True]); } }
/// <summary> /// アセットフィールド /// </summary> private void AssetField(Rect position, LinkAnalyzer.AssetUniqueID uniqueID) { #if SEARCH_TOOLS_DEBUG if (displayGUID) { var label = uniqueID.fileID.ToString("D9") + ":" + uniqueID.guid; EditorGUI.LabelField(position, label); } else //[fallthrough] #endif CustomGUI.ObjectLabelField(position, uniqueID.guid, uniqueID.fileID); var include = linkAnalyzer.IsInclude(uniqueID); position.xMin = position.xMax - position.height; GUI.DrawTexture(position, includeIcons[(int)include]); }
public static void ObjectLabelField(Object value, GUIStyle style, params GUILayoutOption[] options) { var position = GUILayoutUtility.GetRect(GUIContent.none, style, options); CustomGUI.ObjectLabelField(position, value, style); }