118 lines
5.4 KiB
C#
118 lines
5.4 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x0200010C RID: 268
|
|
[Token(Token = "0x200010C")]
|
|
public sealed class AssetLoader
|
|
{
|
|
// Token: 0x17000054 RID: 84
|
|
// (get) Token: 0x06000E74 RID: 3700 RVA: 0x00022CA0 File Offset: 0x00020EA0
|
|
[Token(Token = "0x17000054")]
|
|
public bool IsHandling
|
|
{
|
|
[Token(Token = "0x6000E74")]
|
|
[Address(RVA = "0x34A550", Offset = "0x348D50", VA = "0x18034A550")]
|
|
get
|
|
{
|
|
return this.isHandling;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000055 RID: 85
|
|
// (get) Token: 0x06000E75 RID: 3701 RVA: 0x00022CB4 File Offset: 0x00020EB4
|
|
// (set) Token: 0x06000E76 RID: 3702 RVA: 0x00022CC8 File Offset: 0x00020EC8
|
|
[Token(Token = "0x17000055")]
|
|
public Action<AssetRequestBase, UnityEngine.Object[]> OnFinished
|
|
{
|
|
[Token(Token = "0x6000E75")]
|
|
[Address(RVA = "0x2DB450", Offset = "0x2D9C50", VA = "0x1802DB450")]
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return this.<OnFinished>k__BackingField;
|
|
}
|
|
[Token(Token = "0x6000E76")]
|
|
[Address(RVA = "0x454D70", Offset = "0x453570", VA = "0x180454D70")]
|
|
[CompilerGenerated]
|
|
set
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06000E76)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void AssetLoader::set_OnFinished(System.Action`2<AssetRequestBase,UnityEngine.Object[]>)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{; Block_0:; stfld:class [mscorlib]System.Action`2<class AssetRequestBase, class [UnityEngine.CoreModule]UnityEngine.Object[]>(AssetLoader::<OnFinished>k__BackingField, ldloc:AssetLoader(this), ldloc:class [mscorlib]System.Action`2<class AssetRequestBase, class [UnityEngine.CoreModule]UnityEngine.Object[]>(value)); };
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000E77 RID: 3703 RVA: 0x00022CDC File Offset: 0x00020EDC
|
|
[Token(Token = "0x6000E77")]
|
|
[Address(RVA = "0xB675B0", Offset = "0xB65DB0", VA = "0x180B675B0")]
|
|
public void Load(AssetRequestBase req)
|
|
{
|
|
if (!this.isHandling)
|
|
{
|
|
this.isHandling = true;
|
|
this.LoadFromResources(req);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000E78 RID: 3704 RVA: 0x00022D04 File Offset: 0x00020F04
|
|
[Token(Token = "0x6000E78")]
|
|
[Address(RVA = "0xB673C0", Offset = "0xB65BC0", VA = "0x180B673C0")]
|
|
private void LoadFromResources(AssetRequestBase req)
|
|
{
|
|
UnityEngine.Object @object;
|
|
UnityEngine.Object[] array;
|
|
do
|
|
{
|
|
int num = 0;
|
|
if ((req.<IncludeSubAssets>k__BackingField ? 1 : 0) != num)
|
|
{
|
|
goto IL_53;
|
|
}
|
|
string rootPath = req.RootPath;
|
|
string <AssetName>k__BackingField = req.<AssetName>k__BackingField;
|
|
@object = Resources.Load(rootPath + "/" + <AssetName>k__BackingField);
|
|
int num2 = 0;
|
|
if (!(@object != num2))
|
|
{
|
|
goto IL_78;
|
|
}
|
|
array = new UnityEngine.Object[1];
|
|
}
|
|
while (@object != 0 && array == 0);
|
|
array[0] = @object;
|
|
IL_53:
|
|
string rootPath2 = req.RootPath;
|
|
string <AssetName>k__BackingField2 = req.<AssetName>k__BackingField;
|
|
UnityEngine.Object[] array2 = Resources.LoadAll(rootPath2 + "/" + <AssetName>k__BackingField2);
|
|
IL_78:
|
|
this.<OnFinished>k__BackingField(req, array2);
|
|
}
|
|
|
|
// Token: 0x06000E79 RID: 3705 RVA: 0x00022DA0 File Offset: 0x00020FA0
|
|
[Token(Token = "0x6000E79")]
|
|
[Address(RVA = "0x43A830", Offset = "0x439030", VA = "0x18043A830")]
|
|
public AssetLoader()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04001927 RID: 6439
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4001927")]
|
|
private bool isHandling;
|
|
}
|