File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
CrazyCarClient/Assets/Scripts/System Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ public interface IAddressableSystem : ISystem {
18
18
public void GetDownloadAssets ( ) ;
19
19
public void DownloadAsset ( ) ;
20
20
public UniTask < AsyncOperationHandle < T > > LoadAssetAsync < T > ( string path ) ;
21
+ public AsyncOperationHandle < T > LoadAsset < T > ( string path ) ;
21
22
public void SetUpdateInfo ( Action finish ) ;
22
23
}
23
24
@@ -144,6 +145,12 @@ public async UniTask<AsyncOperationHandle<T>> LoadAssetAsync<T>(string path){
144
145
await obj ;
145
146
return obj ;
146
147
}
148
+
149
+ public AsyncOperationHandle < T > LoadAsset < T > ( string path ) {
150
+ AsyncOperationHandle < T > obj = Addressables . LoadAssetAsync < T > ( path ) ;
151
+ obj . WaitForCompletion ( ) ;
152
+ return obj ;
153
+ }
147
154
148
155
protected override void OnInit ( ) {
149
156
You can’t perform that action at this time.
0 commit comments