also use sourcegen for controller loaders

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

View file

@ -182,7 +182,14 @@ namespace HeavenStudio.InputSystem
if (File.Exists(path)) if (File.Exists(path))
{ {
string json = File.ReadAllText(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 else
{ {

View file

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

View file

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

View file

@ -13,9 +13,16 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
AutoEmitOnScriptUpdate: 1 AutoEmitOnScriptUpdate: 1
AutoEmitDisabledPaths: [] AutoEmitDisabledPaths:
- Assets/Scripts/SourceGenerators/ControllerLoaderGenerator.cs
DenseViewWidthThreshold: 512 DenseViewWidthThreshold: 512
_disableAutoReloadInBackground: 0 _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: [] PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: [] PathsToIgnoreOverwriteSettingOnAttribute: []