Skip to content

Commit db70619

Browse files
author
Jiang Yin
committed
修改struct的布局为自动
1 parent 7e8d8da commit db70619

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Scripts/Editor/ResourceAnalyzer/ResourceAnalyzerController.Stamp.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
// Feedback: mailto:[email protected]
66
//------------------------------------------------------------
77

8+
using System.Runtime.InteropServices;
9+
810
namespace UnityGameFramework.Editor.ResourceTools
911
{
1012
public sealed partial class ResourceAnalyzerController
1113
{
14+
[StructLayout(LayoutKind.Auto)]
1215
private struct Stamp
1316
{
1417
private readonly string m_HostAssetName;

Scripts/Runtime/Resource/EditorResourceComponent.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System;
1414
using System.Collections.Generic;
1515
using System.IO;
16+
using System.Runtime.InteropServices;
1617
using UnityEngine;
1718
using UnityEngine.SceneManagement;
1819

@@ -1573,6 +1574,7 @@ private UnityEngine.Object GetCachedAsset(string assetName)
15731574
return null;
15741575
}
15751576

1577+
[StructLayout(LayoutKind.Auto)]
15761578
private struct LoadAssetInfo
15771579
{
15781580
private readonly string m_AssetName;
@@ -1651,6 +1653,7 @@ public object UserData
16511653
}
16521654
}
16531655

1656+
[StructLayout(LayoutKind.Auto)]
16541657
private struct LoadSceneInfo
16551658
{
16561659
private readonly AsyncOperation m_AsyncOperation;
@@ -1719,6 +1722,7 @@ public object UserData
17191722
}
17201723
}
17211724

1725+
[StructLayout(LayoutKind.Auto)]
17221726
private struct UnloadSceneInfo
17231727
{
17241728
private readonly AsyncOperation m_AsyncOperation;

0 commit comments

Comments
 (0)