Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ private void FinalizeAssetBundleLoading(
AssignEmoteResult(emote, bodyShape, regularAssetResult);
}
else
{
ReportHub.LogWarning(GetReportData(), $"The emote {emote.DTO.id} failed to load from the AB");
AssignFailedEmoteResult(emote, bodyShape);
}

emote.UpdateLoadingStatus(false);
World.Destroy(entity);
Expand All @@ -109,7 +112,10 @@ private void FinalizeGltfLoading(
if (gltfAssetResult.Succeeded && gltfAssetResult.TryToConvertToRegularAsset(out AttachmentRegularAsset regularAssetResult))
AssignEmoteResult(emote, bodyShape, regularAssetResult);
else
{
ReportHub.LogWarning(GetReportData(), $"The emote {emote.DTO.id} failed to load from the GLTF");
AssignFailedEmoteResult(emote, bodyShape);
}

emote.UpdateLoadingStatus(false);
World.Destroy(entity);
Expand All @@ -129,6 +135,21 @@ private void AssignEmoteResult(IEmote emote, BodyShape bodyShape, AttachmentRegu
emote.AssetResults[bodyShape] = asset;
}

private void AssignFailedEmoteResult(IEmote emote, BodyShape bodyShape)
{
var failedResult = new StreamableLoadingResult<AttachmentRegularAsset>(
GetReportData(),
new Exception($"Emote {emote.DTO.id} failed to load"));

if (emote.IsUnisex() && emote.HasSameClipForAllGenders())
{
emote.AssetResults[BodyShape.MALE] = failedResult;
emote.AssetResults[BodyShape.FEMALE] = failedResult;
}
else
emote.AssetResults[bodyShape] = failedResult;
}

private bool IsCancellationRequested<TAsset, TLoadingIntention>(
Entity entity,
ref AssetPromise<TAsset, TLoadingIntention> promise,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using Cysharp.Threading.Tasks;
using DCL.Diagnostics;
using DCL.Ipfs;
using DCL.Optimization.Pools;
using DCL.Platforms;
using DCL.Optimization.Pools;
using DCL.Utility;
using UnityEngine;
using DCL.WebRequests;
Expand Down Expand Up @@ -50,14 +50,16 @@ await LoadAssetBundleManifestAsync(
}


// This fallback manifest fetch is only used by worlds, which don't query the asset-bundle-registry yet.
// Once multi-scene-worlds is merged, worlds will use the registry like catalyst scenes and this path won't be needed.
private async UniTask<SceneAssetBundleManifest> LoadAssetBundleManifestAsync(string hash, ReportData reportCategory, CancellationToken ct)
{
using var scope = URL_BUILDER_POOL.Get(out var urlBuilder);
urlBuilder!.Clear();

urlBuilder.AppendDomain(assetBundleURL)
.AppendSubDirectory(URLSubdirectory.FromString("manifest"))
.AppendPath(URLPath.FromString($"{hash}{PlatformUtils.GetCurrentPlatform()}.json"));
.AppendPath(URLPath.FromString($"{hash}.json"));

URLAddress url = urlBuilder.Build();
SceneAbDto sceneAbDto = await webRequestController.GetAsync(new CommonArguments(url, RetryPolicy.WithRetries(1)), ct, reportCategory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ public abstract class PrepareAssetBundleLoadingParametersSystemBase : BaseUnityL
{
private static readonly string[] COMMON_SHADERS =
{
//TODO: Probably scene_ignore and lit_igore are not needed
#if UNITY_WEBGL
"dcl/scene_ignore",
"dcl/universal render pipeline/lit_ignore",
"dcl/toon_ignore"
"dcl/scene_ignore_webgl",
"dcl/universal render pipeline/lit_ignore_webgl",
#else
"dcl/scene_ignore_windows",
"dcl/scene_ignore_mac",
Expand Down
13 changes: 10 additions & 3 deletions Explorer/Assets/Rendering/ShaderVariants.shadervariants
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,9 @@ ShaderVariantCollection:
- first: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
second:
variants:
- keywords:
- keywords:
passType: 0
- keywords: OUTLINE_ON
passType: 0
- keywords: UNDERLAY_ON
passType: 0
Expand Down Expand Up @@ -657,10 +659,15 @@ ShaderVariantCollection:
passType: 0
- keywords: _TERRAIN_BLEND_HEIGHT
passType: 0
- first: {fileID: 4800000, guid: 84ce70d26f48d412ab142adda1b14f22, type: 3}
second:
variants:
- keywords: SOFTMASK_SIMPLE UNDERLAY_ON
passType: 0
- first: {fileID: 4800000, guid: 28d453dc10844f4418372200603a88e5, type: 3}
second:
variants:
- keywords:
- keywords:
passType: 0
- keywords:
- keywords:
passType: 13
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Loading