Skip to content

Commit

Permalink
Merge pull request #50 from AIO-GAME/1.x
Browse files Browse the repository at this point in the history
1.x
  • Loading branch information
xinansky authored Jan 17, 2024
2 parents e3a36af + c6df550 commit c9b693d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions Runtime/Config/ASConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,26 +236,27 @@ public static ASConfig GetOrCreate()
AssetDatabase.CreateAsset(instance, "Assets/Resources/ASConfig.asset");
AssetDatabase.SaveAssets();
}
}

if (Application.isPlaying)
{
if (instance.ASMode == EASMode.Editor)
if (Application.isPlaying)
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
if (instance.ASMode == EASMode.Editor)
{
if (assembly.GetName().Name != "AIO.Asset.Editor") continue;
var temp = assembly.GetType("AIO.UEditor.AssetCollectRoot", true)
?.GetMethod("GetOrCreate", BindingFlags.Static | BindingFlags.Public)
?.Invoke(null, new object[] { });
if (temp == null) break;
assembly.GetType("AIO.UEditor.AssetProxyEditor", true)
?.GetMethod("ConvertConfig", BindingFlags.Static | BindingFlags.Public)
?.Invoke(null, new object[] { temp, false });
break;
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
if (assembly.GetName().Name != "AIO.Asset.Editor") continue;
var temp = assembly.GetType("AIO.UEditor.AssetCollectRoot", true)
?.GetMethod("GetOrCreate", BindingFlags.Static | BindingFlags.Public)
?.Invoke(null, new object[] { });
if (temp == null) break;
assembly.GetType("AIO.UEditor.AssetProxyEditor", true)
?.GetMethod("ConvertConfig", BindingFlags.Static | BindingFlags.Public)
?.Invoke(null, new object[] { temp, false });
break;
}
}
}
}

#else
instance = GetResource();
#endif
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.aio.cli.asset",
"displayName": "AIO Unity CLI Asset",
"description": "AIO Unity CLI Asset",
"version": "1.0.21-preview",
"version": "1.0.22-preview",
"unity": "2019.4",
"unityRelease": "0f1",
"license": "MIT",
Expand Down

0 comments on commit c9b693d

Please sign in to comment.