This repository was archived by the owner on Jul 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
GameFramework/Editor/AddressablesEditor Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 7
7
using System . Text ;
8
8
using UnityEditor . AddressableAssets . Settings ;
9
9
using System . IO ;
10
+ using UnityEditor . AddressableAssets . Settings . GroupSchemas ;
10
11
11
12
namespace Wanderer . GameFramework
12
13
{
@@ -38,7 +39,18 @@ public static string ShellBuild(string activeProfileId = "Default")
38
39
//将被修改过的资源单独分组
39
40
var groupName = string . Format ( "UpdateGroup_{0}#" , System . DateTime . Now . ToString ( "yyyyMMdd" ) ) ;
40
41
ContentUpdateScript . CreateContentUpdateGroup ( settings , entries , groupName ) ;
42
+ var group = settings . FindGroup ( groupName ) ;
43
+ BundledAssetGroupSchema bagSchema = group . GetSchema < BundledAssetGroupSchema > ( ) ;
44
+ if ( bagSchema == null )
45
+ {
46
+ bagSchema = group . AddSchema < BundledAssetGroupSchema > ( ) ;
47
+ }
48
+ var defultBAGSchema = settings . DefaultGroup . GetSchema < BundledAssetGroupSchema > ( ) ;
49
+
50
+ bagSchema . BuildPath . SetVariableByName ( settings , defultBAGSchema . BuildPath . GetValue ( settings ) ) ;
51
+ bagSchema . LoadPath . SetVariableByName ( settings , defultBAGSchema . LoadPath . GetValue ( settings ) ) ;
41
52
Debug . Log ( $ "Update content:{ @string } ") ;
53
+ EditorUtility . SetDirty ( settings ) ;
42
54
AssetDatabase . Refresh ( ) ;
43
55
}
44
56
You can’t perform that action at this time.
0 commit comments