study/first_study/Library/PackageCache/com.unity.collab-proxy@1ec4e416a4af/Editor/UI/DrawUserIcon.cs
jh04010421 739d49f1a0 Unity | 2026.01.20
수업 실습 파일
2026-01-20 11:01:57 +09:00

31 lines
747 B
C#

using System;
using Codice.Client.Common;
using Unity.PlasticSCM.Editor.UI.Avatar;
using UnityEngine;
namespace Unity.PlasticSCM.Editor.UI
{
internal static class DrawUserIcon
{
internal static void ForPendingChangesTab(
ResolvedUser currentUser,
Action avatarLoadedAction)
{
Rect rect = GUILayoutUtility.GetRect(28f, 28f, GUILayout.ExpandWidth(false));
if (currentUser == null)
{
GUI.DrawTexture(rect, Images.GetEmptyGravatar());
return;
}
GUI.Label(rect, new GUIContent(
GetAvatar.ForEmail(currentUser.Name, avatarLoadedAction),
currentUser.Name));
}
}
}