File tree 1 file changed +11
-1
lines changed
Runtime/Core/Scripts/Operations 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,17 @@ private static bool IsUpdateRequired(AvatarContext context)
129
129
return true ;
130
130
}
131
131
AvatarMetadata previousMetadata = AvatarMetadata . LoadFromFile ( context . AvatarUri . LocalMetadataPath ) ;
132
- return AvatarMetadata . IsUpdated ( context . Metadata , previousMetadata ) ;
132
+ return AvatarMetadata . IsUpdated ( context . Metadata , previousMetadata ) || ShouldUpdateAvatarFile ( context ) ;
133
+ }
134
+
135
+ private static bool ShouldUpdateAvatarFile ( AvatarContext context )
136
+ {
137
+ if ( ! File . Exists ( context . AvatarUri . LocalModelPath ) )
138
+ {
139
+ return true ;
140
+ }
141
+ var avatarFileUpdateTime = File . GetLastWriteTimeUtc ( context . AvatarUri . LocalModelPath ) ;
142
+ return avatarFileUpdateTime < context . Metadata . UpdatedAt ;
133
143
}
134
144
135
145
/// <summary>
You can’t perform that action at this time.
0 commit comments