We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f18909a commit 242a668Copy full SHA for 242a668
1 file changed
GameFrameX.Core/Components/StateComponent.cs
@@ -112,9 +112,9 @@ internal override bool ReadyToInactive
112
/// 激活状态的时候异步读取数据
113
/// </summary>
114
/// <returns>返回查询的数据结果对象,没有数据返回null</returns>
115
- protected virtual async Task ActiveReadStateAsync()
+ protected virtual Task<TState> ActiveReadStateAsync()
116
{
117
- await Task.CompletedTask;
+ return Task.FromResult<TState>(null);
118
}
119
120
/// <summary>
@@ -130,7 +130,7 @@ public async Task ReadStateAsync()
130
131
try
132
133
- await ActiveReadStateAsync();
+ State = await ActiveReadStateAsync();
134
135
catch (Exception e)
136
0 commit comments