Skip to content

Commit

Permalink
Fix png loading to work with Texture types instead of only Texture2D
Browse files Browse the repository at this point in the history
  • Loading branch information
DeathWeasel1337 committed Dec 1, 2020
1 parent 7630d2c commit e841b70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core_Sideloader/Core.Sideloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ private void RedirectHook(IAssetLoadingContext context)
{
if (context.Parameters.Name == null || context.Bundle.name == null) return;

if (context.Parameters.Type == typeof(Texture2D))
if (typeof(Texture).IsAssignableFrom(context.Parameters.Type))
{
string zipPath = $"abdata/{context.Bundle.name.Replace(".unity3d", "", StringComparison.OrdinalIgnoreCase)}/{context.Parameters.Name}.png";

Expand Down

0 comments on commit e841b70

Please sign in to comment.