166 lines
5.3 KiB
C#
166 lines
5.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
|
|
namespace IllusionInjector
|
|
{
|
|
public class PluginComponent : MonoBehaviour
|
|
{
|
|
private CompositePlugin plugins;
|
|
private bool freshlyLoaded = false;
|
|
private bool quitting = false;
|
|
|
|
public static PluginComponent Create()
|
|
{
|
|
return new GameObject("IPA_PluginManager").AddComponent<PluginComponent>();
|
|
}
|
|
|
|
void Awake()
|
|
{
|
|
DontDestroyOnLoad(gameObject);
|
|
|
|
plugins = new CompositePlugin(PluginManager.Plugins);
|
|
plugins.OnApplicationStart();
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
plugins.OnUpdate();
|
|
}
|
|
|
|
void LateUpdate()
|
|
{
|
|
plugins.OnLateUpdate();
|
|
}
|
|
|
|
void FixedUpdate()
|
|
{
|
|
plugins.OnFixedUpdate();
|
|
}
|
|
|
|
void OnDestroy()
|
|
{
|
|
if (!quitting)
|
|
{
|
|
Create();
|
|
}
|
|
}
|
|
|
|
void OnApplicationQuit()
|
|
{
|
|
plugins.OnApplicationQuit();
|
|
|
|
quitting = true;
|
|
}
|
|
|
|
private void OnAnimatorIK(int layerIndex)
|
|
{
|
|
plugins.OnAnimatorIK(layerIndex);
|
|
}
|
|
|
|
private void OnAnimatorMove() { plugins.OnAnimatorMove(); }
|
|
|
|
private void OnApplicationFocus(bool hasFocus) { plugins.OnApplicationFocus(hasFocus); }
|
|
|
|
private void OnApplicationPause(bool pauseStatus) { plugins.OnApplicationPause(pauseStatus); }
|
|
|
|
private void OnAudioFilterRead(float[] data, int channels) { plugins.OnAudioFilterRead(data, channels); }
|
|
|
|
private void OnBecameInvisible() { plugins.OnBecameInvisible(); }
|
|
|
|
private void OnBecameVisible() { plugins.OnBecameVisible(); }
|
|
|
|
private void OnBeforeTransformParentChanged() { plugins.OnBeforeTransformParentChanged(); }
|
|
|
|
private void OnCanvasGroupChanged() { plugins.OnCanvasGroupChanged(); }
|
|
|
|
private void OnCanvasHierarchyChanged() { plugins.OnCanvasHierarchyChanged(); }
|
|
|
|
private void OnCollisionEnter(Collision other) { plugins.OnCollisionEnter(other); }
|
|
|
|
private void OnCollisionEnter2D(Collision2D other) { plugins.OnCollisionEnter2D(other); }
|
|
|
|
private void OnCollisionExit(Collision other) { plugins.OnCollisionExit(other); }
|
|
|
|
private void OnCollisionExit2D(Collision2D other) { plugins.OnCollisionExit2D(other); }
|
|
|
|
private void OnCollisionStay(Collision other) { plugins.OnCollisionStay(other); }
|
|
|
|
private void OnCollisionStay2D(Collision2D other) { plugins.OnCollisionStay2D(other); }
|
|
|
|
private void OnConnectedToServer() { plugins.OnConnectedToServer(); }
|
|
|
|
private void OnControllerColliderHit(ControllerColliderHit hit) { plugins.OnControllerColliderHit(hit); }
|
|
|
|
private void OnDidApplyAnimationProperties() { plugins.OnDidApplyAnimationProperties(); }
|
|
|
|
private void OnDisable() { plugins.OnDisable(); }
|
|
|
|
private void OnDrawGizmos() { plugins.OnDrawGizmos(); }
|
|
|
|
private void OnDrawGizmosSelected() { plugins.OnDrawGizmosSelected(); }
|
|
|
|
private void OnEnable() { plugins.OnEnable(); }
|
|
|
|
private void OnGUI() { plugins.OnGUI(); }
|
|
|
|
private void OnJointBreak(float breakForce) { plugins.OnJointBreak(breakForce); }
|
|
|
|
private void OnMouseDown() { plugins.OnMouseDown(); }
|
|
|
|
private void OnMouseDrag() { plugins.OnMouseDrag(); }
|
|
|
|
private void OnMouseEnter() { plugins.OnMouseEnter(); }
|
|
|
|
private void OnMouseExit() { plugins.OnMouseExit(); }
|
|
|
|
private void OnMouseOver() { plugins.OnMouseOver(); }
|
|
|
|
private void OnMouseUp() { plugins.OnMouseUp(); }
|
|
|
|
private void OnMouseUpAsButton() { plugins.OnMouseUpAsButton(); }
|
|
|
|
private void OnParticleCollision(GameObject other) { plugins.OnParticleCollision(other); }
|
|
|
|
private void OnPostRender() { plugins.OnPostRender(); }
|
|
|
|
private void OnPreCull() { plugins.OnPreCull(); }
|
|
|
|
private void OnPreRender() { plugins.OnPreRender(); }
|
|
|
|
private void OnRectTransformDimensionsChange() { plugins.OnRectTransformDimensionsChange(); }
|
|
|
|
private void OnRenderImage(RenderTexture src, RenderTexture dest) { plugins.OnRenderImage(src, dest); }
|
|
|
|
private void OnRenderObject() { plugins.OnRenderObject(); }
|
|
|
|
private void OnServerInitialized() { plugins.OnServerInitialized(); }
|
|
|
|
private void OnTransformChildrenChanged() { plugins.OnTransformChildrenChanged(); }
|
|
|
|
private void OnTransformParentChanged() { plugins.OnTransformParentChanged(); }
|
|
|
|
private void OnTriggerEnter(Collider other) { plugins.OnTriggerEnter(other); }
|
|
|
|
private void OnTriggerEnter2D(Collider2D other) { plugins.OnTriggerEnter2D(other); }
|
|
|
|
private void OnTriggerExit(Collider other) { plugins.OnTriggerExit(other); }
|
|
|
|
private void OnTriggerExit2D(Collider2D other) { plugins.OnTriggerExit2D(other); }
|
|
|
|
private void OnTriggerStay(Collider other) { plugins.OnTriggerStay(other); }
|
|
|
|
private void OnTriggerStay2D(Collider2D other) { plugins.OnTriggerStay2D(other); }
|
|
|
|
private void OnValidate() { plugins.OnValidate(); }
|
|
|
|
private void OnWillRenderObject() { plugins.OnWillRenderObject(); }
|
|
|
|
private void Reset() { plugins.Reset(); }
|
|
}
|
|
}
|