@@ -7,6 +7,18 @@ namespace Wanderer.GameFramework
7
7
{
8
8
public static class ResourceManagerExtension
9
9
{
10
+ //Object
11
+ public static void LoadObject ( this ResourceManager resource , string assetPath , Action < UnityEngine . Object > callback )
12
+ {
13
+ resource . Asset . LoadAsset < UnityEngine . Object > ( assetPath , callback ) ;
14
+ }
15
+
16
+ public static UnityEngine . Object LoadObjectSync ( this ResourceManager resource , string assetPath )
17
+ {
18
+ return resource . Asset . LoadAsset < UnityEngine . Object > ( assetPath ) ;
19
+ }
20
+
21
+ //GameObject
10
22
public static void LoadGameObject ( this ResourceManager resource , string assetPath , Action < GameObject > callback )
11
23
{
12
24
resource . Asset . LoadAsset < GameObject > ( assetPath , callback ) ;
@@ -17,6 +29,7 @@ public static GameObject LoadGameObjectSync(this ResourceManager resource, strin
17
29
return resource . Asset . LoadAsset < GameObject > ( assetPath ) ;
18
30
}
19
31
32
+ //Texture
20
33
public static void LoadTextAsset ( this ResourceManager resource , string assetPath , Action < TextAsset > callback )
21
34
{
22
35
resource . Asset . LoadAsset < TextAsset > ( assetPath , callback ) ;
@@ -26,7 +39,8 @@ public static TextAsset LoadTextAssetSync(this ResourceManager resource, string
26
39
{
27
40
return resource . Asset . LoadAsset < TextAsset > ( assetPath ) ;
28
41
}
29
-
42
+
43
+ //Sprite
30
44
public static void LoadSprite ( this ResourceManager resource , string assetPath , Action < Sprite > callback )
31
45
{
32
46
resource . Asset . LoadAsset < Sprite > ( assetPath , callback ) ;
0 commit comments