Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit f0501d8

Browse files
Fix photo bug (#92)
1 parent eea4064 commit f0501d8

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

unity/acsShowcase/Assets/Prefabs/Users/MainUser.prefab

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ MonoBehaviour:
224224
- {fileID: 2800000, guid: 31c743e644772c44492a5100b330ae6d, type: 3}
225225
- {fileID: 2800000, guid: d2086432f49773e4abf53fc65626554c, type: 3}
226226
pressableButton: {fileID: 0}
227+
defaultIconTexture: {fileID: 2800000, guid: a7c55f177c2da3c48ade207a599e9ddd, type: 3}
227228
--- !u!114 &7152402777604146220
228229
MonoBehaviour:
229230
m_ObjectHideFlags: 0

unity/acsShowcase/Assets/Scripts/Graph/PhotoGetter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ protected override void OnAuthenticated()
6767
#region Private Functions
6868
private async void UpdateProfilesWorkerAsync()
6969
{
70+
Photo = null;
7071
byte[] data = null;
7172
string token = Token;
7273
if (!string.IsNullOrEmpty(token))

unity/acsShowcase/Assets/Scripts/UI/UserObject.cs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ [SerializeField] [Tooltip("The texture image of the presence")]
2727
private List<Texture2D> presences;
2828
[SerializeField] [Tooltip("The pressable button of this user object")]
2929
private PressableButton pressableButton;
30-
30+
[SerializeField] [Tooltip("The default icon texture")]
31+
private Texture defaultIconTexture;
32+
3133
/// <summary>
3234
/// list of background color
3335
/// </summary>
@@ -98,11 +100,6 @@ public PageType UserObjectPageType
98100
/// </summary>
99101
private PresenceAvailability presenceAvail;
100102

101-
102-
/// <summary>
103-
/// default icon texture
104-
/// </summary>
105-
private Texture defaultIconTexture;
106103

107104
/// <summary>
108105
/// user presence
@@ -128,14 +125,6 @@ public PresenceAvailability Presence
128125
/// </summary>
129126
public static event Action<UserObject> OnSelectedParticipantCall;
130127

131-
/// <summary>
132-
/// Start
133-
/// </summary>
134-
void Start()
135-
{
136-
defaultIconTexture = profileIcon.texture;
137-
}
138-
139128
/// <summary>
140129
/// copy user object
141130
/// </summary>

0 commit comments

Comments
 (0)