File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 1- #if UNITY_EDITOR
2- using System . Linq ;
3- using UnityEditor ;
1+ #if UNITY_EDITOR
42using UnityEditor . Build ;
53using UnityEditor . Build . Reporting ;
64using UnityEngine ;
@@ -11,17 +9,8 @@ public class StorageBuildProcessor : IPreprocessBuildWithReport
119 {
1210 public int callbackOrder => 0 ;
1311
14- public void OnPreprocessBuild ( BuildReport report )
15- {
16- var assets = EditorStorage . GetAllAssetsOfType < ScriptableObject > ( ) ;
17- var loadables = assets . Where ( x => x is ILoadable ) . ToArray ( ) ;
18- var initializables = assets . Where ( x => x is IInitializableBeforeBuild ) . Cast < IInitializableBeforeBuild > ( ) ;
19-
20- Resources . Load < Storage > ( "ToolBoxStorage" ) . SetAssets ( loadables ) ;
21-
22- foreach ( var initializable in initializables )
23- initializable . Init ( ) ;
24- }
12+ public void OnPreprocessBuild ( BuildReport report ) =>
13+ Resources . Load < Storage > ( "ToolBoxStorage" ) . LoadAssets ( ) ;
2514 }
2615}
2716#endif
You can’t perform that action at this time.
0 commit comments