@@ -25,7 +25,7 @@ public class Unbound : BaseUnityPlugin
2525 {
2626 private const string ModId = "com.willis.rounds.unbound" ;
2727 private const string ModName = "Rounds Unbound" ;
28- public const string Version = "3.2.7 " ;
28+ public const string Version = "3.2.8 " ;
2929
3030 public static Unbound Instance { get ; private set ; }
3131 public static readonly ConfigFile config = new ConfigFile ( Path . Combine ( Paths . ConfigPath , "UnboundLib.cfg" ) , true ) ;
@@ -163,20 +163,6 @@ IEnumerator ArmsRaceStartCoroutine(On.GM_ArmsRace.orig_Start orig, GM_ArmsRace s
163163 // hook for closing ongoing lobbies
164164 GameModeManager . AddHook ( GameModeHooks . HookGameStart , CloseLobby ) ;
165165
166- // Load toggleUI asset bundle
167- toggleUI = AssetUtils . LoadAssetBundleFromResources ( "togglemenuui" , typeof ( ToggleLevelMenuHandler ) . Assembly ) ;
168-
169- // Load toggleUI asset bundle
170- linkAssets = AssetUtils . LoadAssetBundleFromResources ( "unboundlinks" , typeof ( Unbound ) . Assembly ) ;
171-
172- // Add managers
173- gameObject . AddComponent < LevelManager > ( ) ;
174- gameObject . AddComponent < CardManager > ( ) ;
175-
176- // Add menu handlers
177- gameObject . AddComponent < ToggleLevelMenuHandler > ( ) ;
178- gameObject . AddComponent < ToggleCardsMenuHandler > ( ) ;
179-
180166 On . CardChoice . Start += ( orig , self ) =>
181167 {
182168 for ( int i = 0 ; i < self . cards . Length ; i ++ )
@@ -242,6 +228,14 @@ private void Awake()
242228 var harmony = new Harmony ( ModId ) ;
243229 harmony . PatchAll ( ) ;
244230
231+ // Add managers
232+ gameObject . AddComponent < LevelManager > ( ) ;
233+ gameObject . AddComponent < CardManager > ( ) ;
234+
235+ // Add menu handlers
236+ gameObject . AddComponent < ToggleLevelMenuHandler > ( ) ;
237+ gameObject . AddComponent < ToggleCardsMenuHandler > ( ) ;
238+
245239 LoadAssets ( ) ;
246240 GameModeManager . Init ( ) ;
247241
@@ -365,7 +359,10 @@ private void OnGUI()
365359
366360 private static void LoadAssets ( )
367361 {
362+ toggleUI = AssetUtils . LoadAssetBundleFromResources ( "togglemenuui" , typeof ( ToggleLevelMenuHandler ) . Assembly ) ;
363+ linkAssets = AssetUtils . LoadAssetBundleFromResources ( "unboundlinks" , typeof ( Unbound ) . Assembly ) ;
368364 UIAssets = AssetUtils . LoadAssetBundleFromResources ( "unboundui" , typeof ( Unbound ) . Assembly ) ;
365+
369366 if ( UIAssets != null )
370367 {
371368 modalPrefab = UIAssets . LoadAsset < GameObject > ( "Modal" ) ;
0 commit comments