also use sourcegen for controller loaders

This commit is contained in:
minenice55 2024-01-18 21:38:01 -05:00
parent e262d051ba
commit 99bb47cf1b
12 changed files with 332 additions and 209 deletions

View file

@ -182,7 +182,14 @@ namespace HeavenStudio.InputSystem
if (File.Exists(path))
{
string json = File.ReadAllText(path);
currentBindings = JsonUtility.FromJson<ControlBindings>(json);
if (json is not null or "")
{
currentBindings = JsonUtility.FromJson<ControlBindings>(json);
}
else
{
ResetBindings();
}
}
else
{

View file

@ -1,15 +1,12 @@
using System;
using System.Linq;
using System.Reflection;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HeavenStudio.InputSystem;
using static JSL;
using HeavenStudio.Games;
using System.Diagnostics.Contracts;
using SatorImaging.UnitySourceGenerator;
namespace HeavenStudio.InputSystem
{
@ -25,7 +22,8 @@ namespace HeavenStudio.InputSystem
namespace HeavenStudio
{
public class PlayerInput
[UnitySourceGenerator(typeof(ControllerLoaderGenerator), OverwriteIfFileExists = false)]
public partial class PlayerInput
{
public class InputAction
{
@ -57,40 +55,40 @@ namespace HeavenStudio
public delegate InputController[] InputControllerRefresh();
public static List<InputControllerRefresh> PlayerInputRefresh;
static List<InputControllerInitializer> loadRunners;
static void BuildLoadRunnerList()
{
PlayerInputRefresh = new();
loadRunners = System.Reflection.Assembly.GetExecutingAssembly()
.GetTypes()
.Where(x => x.Namespace == "HeavenStudio.InputSystem.Loaders" && x.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static) != null)
.Select(t => (InputControllerInitializer)Delegate.CreateDelegate(
typeof(InputControllerInitializer),
null,
t.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static),
false
))
.ToList();
// static List<InputControllerInitializer> loadRunners;
// static void BuildLoadRunnerList()
// {
// PlayerInputRefresh = new();
// loadRunners = System.Reflection.Assembly.GetExecutingAssembly()
// .GetTypes()
// .Where(x => x.Namespace == "HeavenStudio.InputSystem.Loaders" && x.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static) != null)
// .Select(t => (InputControllerInitializer)Delegate.CreateDelegate(
// typeof(InputControllerInitializer),
// null,
// t.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static),
// false
// ))
// .ToList();
loadRunners.Sort((x, y) => x.Method.GetCustomAttribute<LoadOrder>().Order.CompareTo(y.Method.GetCustomAttribute<LoadOrder>().Order));
}
// loadRunners.Sort((x, y) => x.Method.GetCustomAttribute<LoadOrder>().Order.CompareTo(y.Method.GetCustomAttribute<LoadOrder>().Order));
// }
public static int InitInputControllers()
{
inputDevices = new List<InputController>();
// public static int InitInputControllers()
// {
// inputDevices = new List<InputController>();
BuildLoadRunnerList();
foreach (InputControllerInitializer runner in loadRunners)
{
InputController[] controllers = runner();
if (controllers != null)
{
inputDevices.AddRange(controllers);
}
}
// BuildLoadRunnerList();
// foreach (InputControllerInitializer runner in loadRunners)
// {
// InputController[] controllers = runner();
// if (controllers != null)
// {
// inputDevices.AddRange(controllers);
// }
// }
return inputDevices.Count;
}
// return inputDevices.Count;
// }
public static int RefreshInputControllers()
{

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 91d174098996c5f4ea7ea011d63d65db
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,59 @@
// <auto-generated>ControllerLoaderGenerator</auto-generated>
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using HeavenStudio.InputSystem;
using HeavenStudio.InputSystem.Loaders;
using Debug = UnityEngine.Debug;
namespace HeavenStudio
{
partial class PlayerInput
{
public static int InitInputControllers()
{
InputController[] controllers;
PlayerInputRefresh = new();
controllers = InputJoyshockInitializer.Initialize();
if (controllers != null)
{
inputDevices.AddRange(controllers);
}
else
{
Debug.Log("InputJoyshockInitializer.Initialize had no controllers to initialize.");
}
controllers = InputKeyboardInitializer.Initialize();
if (controllers != null)
{
inputDevices.AddRange(controllers);
}
else
{
Debug.Log("InputKeyboardInitializer.Initialize had no controllers to initialize.");
}
controllers = InputMouseInitializer.Initialize();
if (controllers != null)
{
inputDevices.AddRange(controllers);
}
else
{
Debug.Log("InputMouseInitializer.Initialize had no controllers to initialize.");
}
return inputDevices.Count;
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0eb2420494f0797478ab004aa2105fdc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b6fd3363f22afb8479c537cbd0281a80
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,130 @@
using static SatorImaging.UnitySourceGenerator.USGFullNameOf;
using SatorImaging.UnitySourceGenerator;
using System;
using System.Text;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
#if UNITY_EDITOR
using UnityEditor;
#endif
using HeavenStudio;
using HeavenStudio.InputSystem;
// HOW TO USE: Add the following attribute to *target* class.
// Note that target class must be defined as partial.
//[UnitySourceGenerator(typeof(ControllerLoaderGenerator), OverwriteIfFileExists = false)]
public partial class ControllerLoaderGenerator
{
#if UNITY_EDITOR // USG: class definition is required to avoid build error but methods are not.
#pragma warning disable IDE0051
readonly static string MEMBER_ACCESS = "public static";
readonly static string MAIN_MEMBER_NAME = "InitInputControllers";
static string OutputFileName() => MAIN_MEMBER_NAME + ".cs"; // -> Name.<TargetClass>.<GeneratorClass>.g.cs
static bool Emit(USGContext context, StringBuilder sb)
{
List<PlayerInput.InputControllerInitializer> loadRunners = Assembly.GetExecutingAssembly()
.GetTypes()
.Where(x => x.Namespace == "HeavenStudio.InputSystem.Loaders" && x.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static) != null)
.Select(t => (PlayerInput.InputControllerInitializer)Delegate.CreateDelegate(
typeof(PlayerInput.InputControllerInitializer),
null,
t.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static),
false
))
.ToList();
// USG: static classes are IsAbstract is set.
if (!context.TargetClass.IsClass)
return false; // return false to tell USG doesn't write file.
// USG: you can modify output path. default file name is that USG generated.
// note that USG doesn't care the modified path is valid or not.
//context.OutputPath += "_MyFirstTest.txt";
// USG: EditorUtility.DisplayDialog() or others don't work in batch mode.
// throw if method depending on GUI based functions.
//if (UnityEngine.Application.isBatchMode)
// throw new System.NotSupportedException("GUI based functions do nothing in batch mode.");
// USG: write content into passed StringBuilder.
sb.Append($@"
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using HeavenStudio.InputSystem;
using HeavenStudio.InputSystem.Loaders;
using Debug = UnityEngine.Debug;
namespace {context.TargetClass.Namespace}
{{
partial class {context.TargetClass.Name}
{{
");
// class open ----------------------------------------------------------------------
#region // USG: MainMember
sb.Append($@"
{MEMBER_ACCESS} int {MAIN_MEMBER_NAME}()
{{
");
sb.IndentLevel(3);
sb.Append($@"
InputController[] controllers;
PlayerInputRefresh = new();
");
foreach (var loadRunner in loadRunners)
{
MethodInfo methodInfo = RuntimeReflectionExtensions.GetMethodInfo(loadRunner);
string callingClass = methodInfo.DeclaringType.Name;
string method = methodInfo.Name;
string fullMethodLabel = $"{callingClass}.{method}";
sb.Append($@"
controllers = {fullMethodLabel}();
if (controllers != null)
{{
inputDevices.AddRange(controllers);
}}
else
{{
Debug.Log(""{fullMethodLabel} had no controllers to initialize."");
}}
");
}
sb.Append($@"
return inputDevices.Count;
");
// USG: semicolon?
sb.Append($@"
}}
");
#endregion
// class close ----------------------------------------------------------------------
sb.Append($@"
}}
}}
");
// USG: return true to tell USG to write content into OutputPath. false to do nothing.
return true;
}
#pragma warning restore IDE0051
#endif
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 92162f67b41995a438008f78a72baba2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -53,13 +53,7 @@ public partial class MinigameLoaderGenerator
// USG: write content into passed StringBuilder.
sb.Append($@"
using System;
using System.Collections.Generic;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
using HeavenStudio;
using HeavenStudio.Games.Loaders;
namespace {context.TargetClass.Namespace}
@ -90,7 +84,7 @@ namespace {context.TargetClass.Namespace}
sb.Append($@"
Debug.Log(""Running game loader {callingClass}"");
game = {fullMethodLabel}(eventCaller);
game = {fullMethodLabel}(eventCaller);
if (game != null)
{{
eventCaller.minigames.Add(game.name, game);

View file

@ -1,12 +1,6 @@
// <auto-generated>MinigameLoaderGenerator</auto-generated>
using System;
using System.Collections.Generic;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
using HeavenStudio;
using HeavenStudio.Games.Loaders;
namespace HeavenStudio
@ -19,10 +13,8 @@ namespace HeavenStudio
Minigames.Minigame game;
Debug.Log("Running game loader RvlBadmintonLoader");
game = RvlBadmintonLoader.AddGame(eventCaller);
game = RvlBadmintonLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -32,10 +24,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlBadmintonLoader failed!");
}
Debug.Log("Running game loader CtrBearLoader");
game = CtrBearLoader.AddGame(eventCaller);
game = CtrBearLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -45,10 +35,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader CtrBearLoader failed!");
}
Debug.Log("Running game loader RvlBoardMeetingLoader");
game = RvlBoardMeetingLoader.AddGame(eventCaller);
game = RvlBoardMeetingLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -58,10 +46,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlBoardMeetingLoader failed!");
}
Debug.Log("Running game loader NtrFlickLoader");
game = NtrFlickLoader.AddGame(eventCaller);
game = NtrFlickLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -71,10 +57,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrFlickLoader failed!");
}
Debug.Log("Running game loader CtrCatchLoader");
game = CtrCatchLoader.AddGame(eventCaller);
game = CtrCatchLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -84,10 +68,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader CtrCatchLoader failed!");
}
Debug.Log("Running game loader RvlBookLoader");
game = RvlBookLoader.AddGame(eventCaller);
game = RvlBookLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -97,10 +79,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlBookLoader failed!");
}
Debug.Log("Running game loader AgbClapLoader");
game = AgbClapLoader.AddGame(eventCaller);
game = AgbClapLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -110,10 +90,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbClapLoader failed!");
}
Debug.Log("Running game loader NtrCoinLoader");
game = NtrCoinLoader.AddGame(eventCaller);
game = NtrCoinLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -123,10 +101,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrCoinLoader failed!");
}
Debug.Log("Running game loader NtrCropLoader");
game = NtrCropLoader.AddGame(eventCaller);
game = NtrCropLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -136,10 +112,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrCropLoader failed!");
}
Debug.Log("Running game loader NtrDjLoader");
game = NtrDjLoader.AddGame(eventCaller);
game = NtrDjLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -149,10 +123,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrDjLoader failed!");
}
Debug.Log("Running game loader NtrDogNinjaLoader");
game = NtrDogNinjaLoader.AddGame(eventCaller);
game = NtrDogNinjaLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -162,10 +134,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrDogNinjaLoader failed!");
}
Debug.Log("Running game loader RvlDoubleDateLoader");
game = RvlDoubleDateLoader.AddGame(eventCaller);
game = RvlDoubleDateLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -175,10 +145,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlDoubleDateLoader failed!");
}
Debug.Log("Running game loader CtrDrummingLoader");
game = CtrDrummingLoader.AddGame(eventCaller);
game = CtrDrummingLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -188,10 +156,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader CtrDrummingLoader failed!");
}
Debug.Log("Running game loader NtrIdolLoader");
game = NtrIdolLoader.AddGame(eventCaller);
game = NtrIdolLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -201,10 +167,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrIdolLoader failed!");
}
Debug.Log("Running game loader AgbFireworkLoader");
game = AgbFireworkLoader.AddGame(eventCaller);
game = AgbFireworkLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -214,10 +178,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbFireworkLoader failed!");
}
Debug.Log("Running game loader CtrFirstContact");
game = CtrFirstContact.AddGame(eventCaller);
game = CtrFirstContact.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -227,10 +189,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader CtrFirstContact failed!");
}
Debug.Log("Running game loader RvlFlipperFlopLoader");
game = RvlFlipperFlopLoader.AddGame(eventCaller);
game = RvlFlipperFlopLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -240,10 +200,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlFlipperFlopLoader failed!");
}
Debug.Log("Running game loader RvlForkLoader");
game = RvlForkLoader.AddGame(eventCaller);
game = RvlForkLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -253,10 +211,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlForkLoader failed!");
}
Debug.Log("Running game loader NtrGleeClubLoader");
game = NtrGleeClubLoader.AddGame(eventCaller);
game = NtrGleeClubLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -266,10 +222,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrGleeClubLoader failed!");
}
Debug.Log("Running game loader RvlNewKarateLoader");
game = RvlNewKarateLoader.AddGame(eventCaller);
game = RvlNewKarateLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -279,10 +233,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlNewKarateLoader failed!");
}
Debug.Log("Running game loader CtrTeppanLoader");
game = CtrTeppanLoader.AddGame(eventCaller);
game = CtrTeppanLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -292,10 +244,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader CtrTeppanLoader failed!");
}
Debug.Log("Running game loader RvlRocketLoader");
game = RvlRocketLoader.AddGame(eventCaller);
game = RvlRocketLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -305,10 +255,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlRocketLoader failed!");
}
Debug.Log("Running game loader NtrBackbeatLoader");
game = NtrBackbeatLoader.AddGame(eventCaller);
game = NtrBackbeatLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -318,10 +266,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrBackbeatLoader failed!");
}
Debug.Log("Running game loader AgbMarcherLoader");
game = AgbMarcherLoader.AddGame(eventCaller);
game = AgbMarcherLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -331,10 +277,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbMarcherLoader failed!");
}
Debug.Log("Running game loader PcoMeatLoader");
game = PcoMeatLoader.AddGame(eventCaller);
game = PcoMeatLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -344,10 +288,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader PcoMeatLoader failed!");
}
Debug.Log("Running game loader AgbUpbeatLoader");
game = AgbUpbeatLoader.AddGame(eventCaller);
game = AgbUpbeatLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -357,10 +299,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbUpbeatLoader failed!");
}
Debug.Log("Running game loader ntrMunchyMonkLoader");
game = ntrMunchyMonkLoader.AddGame(eventCaller);
game = ntrMunchyMonkLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -370,10 +310,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader ntrMunchyMonkLoader failed!");
}
Debug.Log("Running game loader NtrOctopusMachineLoader");
game = NtrOctopusMachineLoader.AddGame(eventCaller);
game = NtrOctopusMachineLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -383,10 +321,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrOctopusMachineLoader failed!");
}
Debug.Log("Running game loader CtrPillowLoader");
game = CtrPillowLoader.AddGame(eventCaller);
game = CtrPillowLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -396,10 +332,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader CtrPillowLoader failed!");
}
Debug.Log("Running game loader AgbQuizShowLoader");
game = AgbQuizShowLoader.AddGame(eventCaller);
game = AgbQuizShowLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -409,10 +343,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbQuizShowLoader failed!");
}
Debug.Log("Running game loader NtrPingpongLoader");
game = NtrPingpongLoader.AddGame(eventCaller);
game = NtrPingpongLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -422,10 +354,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrPingpongLoader failed!");
}
Debug.Log("Running game loader PcoSomenLoader");
game = PcoSomenLoader.AddGame(eventCaller);
game = PcoSomenLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -435,10 +365,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader PcoSomenLoader failed!");
}
Debug.Log("Running game loader AgbHairLoader");
game = AgbHairLoader.AddGame(eventCaller);
game = AgbHairLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -448,10 +376,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbHairLoader failed!");
}
Debug.Log("Running game loader RvlRingsideLoader");
game = RvlRingsideLoader.AddGame(eventCaller);
game = RvlRingsideLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -461,10 +387,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlRingsideLoader failed!");
}
Debug.Log("Running game loader NtrRockersLoader");
game = NtrRockersLoader.AddGame(eventCaller);
game = NtrRockersLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -474,10 +398,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrRockersLoader failed!");
}
Debug.Log("Running game loader NtrSamuraiLoader");
game = NtrSamuraiLoader.AddGame(eventCaller);
game = NtrSamuraiLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -487,10 +409,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrSamuraiLoader failed!");
}
Debug.Log("Running game loader RvlSeeSawLoader");
game = RvlSeeSawLoader.AddGame(eventCaller);
game = RvlSeeSawLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -500,10 +420,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlSeeSawLoader failed!");
}
Debug.Log("Running game loader AgbGhostLoader");
game = AgbGhostLoader.AddGame(eventCaller);
game = AgbGhostLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -513,10 +431,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbGhostLoader failed!");
}
Debug.Log("Running game loader AgbBatterLoader");
game = AgbBatterLoader.AddGame(eventCaller);
game = AgbBatterLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -526,10 +442,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbBatterLoader failed!");
}
Debug.Log("Running game loader AgbSpaceDanceLoader");
game = AgbSpaceDanceLoader.AddGame(eventCaller);
game = AgbSpaceDanceLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -539,10 +453,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbSpaceDanceLoader failed!");
}
Debug.Log("Running game loader NtrSoccerLoader");
game = NtrSoccerLoader.AddGame(eventCaller);
game = NtrSoccerLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -552,10 +464,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrSoccerLoader failed!");
}
Debug.Log("Running game loader NtrSplashdownLoader");
game = NtrSplashdownLoader.AddGame(eventCaller);
game = NtrSplashdownLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -565,10 +475,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrSplashdownLoader failed!");
}
Debug.Log("Running game loader RvlTambourineLoader");
game = RvlTambourineLoader.AddGame(eventCaller);
game = RvlTambourineLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -578,10 +486,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlTambourineLoader failed!");
}
Debug.Log("Running game loader AgbTapLoader");
game = AgbTapLoader.AddGame(eventCaller);
game = AgbTapLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -591,10 +497,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbTapLoader failed!");
}
Debug.Log("Running game loader RvlTapTroupeLoader");
game = RvlTapTroupeLoader.AddGame(eventCaller);
game = RvlTapTroupeLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -604,10 +508,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader RvlTapTroupeLoader failed!");
}
Debug.Log("Running game loader NtrDazzlesLoader");
game = NtrDazzlesLoader.AddGame(eventCaller);
game = NtrDazzlesLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -617,10 +519,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrDazzlesLoader failed!");
}
Debug.Log("Running game loader AgbTossBoysLoader");
game = AgbTossBoysLoader.AddGame(eventCaller);
game = AgbTossBoysLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -630,10 +530,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbTossBoysLoader failed!");
}
Debug.Log("Running game loader AgbTramLoader");
game = AgbTramLoader.AddGame(eventCaller);
game = AgbTramLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -643,10 +541,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbTramLoader failed!");
}
Debug.Log("Running game loader MobTrickLoader");
game = MobTrickLoader.AddGame(eventCaller);
game = MobTrickLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -656,10 +552,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader MobTrickLoader failed!");
}
Debug.Log("Running game loader NtrTunnelLoader");
game = NtrTunnelLoader.AddGame(eventCaller);
game = NtrTunnelLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -669,10 +563,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader NtrTunnelLoader failed!");
}
Debug.Log("Running game loader AgbWaltzLoader");
game = AgbWaltzLoader.AddGame(eventCaller);
game = AgbWaltzLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
@ -682,10 +574,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbWaltzLoader failed!");
}
Debug.Log("Running game loader RvlWorkingDoughLoader");
game = RvlWorkingDoughLoader.AddGame(eventCaller);
game = RvlWorkingDoughLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);

View file

@ -13,9 +13,16 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
AutoEmitOnScriptUpdate: 1
AutoEmitDisabledPaths: []
AutoEmitDisabledPaths:
- Assets/Scripts/SourceGenerators/ControllerLoaderGenerator.cs
DenseViewWidthThreshold: 512
_disableAutoReloadInBackground: 0
ImportedScriptPaths: []
ImportedScriptPaths:
- Assets/Scripts/InputSystem/PlayerInput.cs
- Assets/Scripts/SourceGenerators/ControllerLoaderGenerator.cs
- Assets/Scripts/SourceGenerators/MinigameLoaderGenerator.cs
- Assets/Scripts/GlobalGameManager.cs
- Assets/Scripts/InputSystem/InputController.cs
- Assets/Scripts/Minigames.cs
PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: []