Fix minor errors which stop patching

This commit is contained in:
NGnius (Graham) 2020-08-22 09:47:59 -04:00
parent ccaa7be436
commit 309547294a
4 changed files with 70 additions and 66 deletions

View file

@ -1,6 +1,7 @@
using IllusionPlugin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
@ -19,7 +20,8 @@ namespace IllusionInjector
public void OnApplicationStart()
{
Invoke(plugin => plugin.OnApplicationStart());
Debug.LogWarning($"OnApplicationStart Test Warning");
Invoke(plugin => plugin.OnApplicationStart(), "OnApplicationStart");
}
public void OnApplicationQuit()
@ -28,13 +30,15 @@ namespace IllusionInjector
}
private void Invoke(CompositeCall callback)
private void Invoke(CompositeCall callback, string name = null)
{
foreach (var plugin in plugins)
{
try
{
callback(plugin);
if (!string.IsNullOrEmpty(name))
Debug.LogWarning($"Executed {name} for plugin {plugin.Name}");
}
catch (Exception ex)
{

View file

@ -34,22 +34,22 @@
<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll</HintPath>-->
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.CoreModule.dll</HintPath>-->
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>-->
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath>-->
<Private>False</Private>
</Reference>
</ItemGroup>

View file

@ -13,283 +13,283 @@ namespace IllusionPlugin
/// <example>{ "PlayClub", "PlayClubStudio" }</example>
public string[] Filter { get; } = new[] {"Gamecraft", "GamecraftPreview"};
public void OnLateUpdate()
public virtual void OnLateUpdate()
{
}
public abstract string Name { get; }
public abstract string Version { get; }
public void OnApplicationStart()
public virtual void OnApplicationStart()
{
}
public void OnApplicationQuit()
public virtual void OnApplicationQuit()
{
}
public void OnUpdate()
public virtual void OnUpdate()
{
}
public void OnFixedUpdate()
public virtual void OnFixedUpdate()
{
}
public void OnAnimatorIK(int layerIndex)
public virtual void OnAnimatorIK(int layerIndex)
{
}
public void OnAnimatorMove()
public virtual void OnAnimatorMove()
{
}
public void OnApplicationFocus(bool hasFocus)
public virtual void OnApplicationFocus(bool hasFocus)
{
}
public void OnApplicationPause(bool pauseStatus)
public virtual void OnApplicationPause(bool pauseStatus)
{
}
public void OnAudioFilterRead(float[] data, int channels)
public virtual void OnAudioFilterRead(float[] data, int channels)
{
}
public void OnBecameInvisible()
public virtual void OnBecameInvisible()
{
}
public void OnBecameVisible()
public virtual void OnBecameVisible()
{
}
public void OnBeforeTransformParentChanged()
public virtual void OnBeforeTransformParentChanged()
{
}
public void OnCanvasGroupChanged()
public virtual void OnCanvasGroupChanged()
{
}
public void OnCanvasHierarchyChanged()
public virtual void OnCanvasHierarchyChanged()
{
}
public void OnCollisionEnter(Collision other)
public virtual void OnCollisionEnter(Collision other)
{
}
public void OnCollisionEnter2D(Collision2D other)
public virtual void OnCollisionEnter2D(Collision2D other)
{
}
public void OnCollisionExit(Collision other)
public virtual void OnCollisionExit(Collision other)
{
}
public void OnCollisionExit2D(Collision2D other)
public virtual void OnCollisionExit2D(Collision2D other)
{
}
public void OnCollisionStay(Collision other)
public virtual void OnCollisionStay(Collision other)
{
}
public void OnCollisionStay2D(Collision2D other)
public virtual void OnCollisionStay2D(Collision2D other)
{
}
public void OnConnectedToServer()
public virtual void OnConnectedToServer()
{
}
public void OnControllerColliderHit(ControllerColliderHit hit)
public virtual void OnControllerColliderHit(ControllerColliderHit hit)
{
}
public void OnDidApplyAnimationProperties()
public virtual void OnDidApplyAnimationProperties()
{
}
public void OnDisable()
public virtual void OnDisable()
{
}
public void OnDrawGizmos()
public virtual void OnDrawGizmos()
{
}
public void OnDrawGizmosSelected()
public virtual void OnDrawGizmosSelected()
{
}
public void OnEnable()
public virtual void OnEnable()
{
}
public void OnGUI()
public virtual void OnGUI()
{
}
public void OnJointBreak(float breakForce)
public virtual void OnJointBreak(float breakForce)
{
}
public void OnMouseDown()
public virtual void OnMouseDown()
{
}
public void OnMouseDrag()
public virtual void OnMouseDrag()
{
}
public void OnMouseEnter()
public virtual void OnMouseEnter()
{
}
public void OnMouseExit()
public virtual void OnMouseExit()
{
}
public void OnMouseOver()
public virtual void OnMouseOver()
{
}
public void OnMouseUp()
public virtual void OnMouseUp()
{
}
public void OnMouseUpAsButton()
public virtual void OnMouseUpAsButton()
{
}
public void OnParticleCollision(GameObject other)
public virtual void OnParticleCollision(GameObject other)
{
}
public void OnPostRender()
public virtual void OnPostRender()
{
}
public void OnPreCull()
public virtual void OnPreCull()
{
}
public void OnPreRender()
public virtual void OnPreRender()
{
}
public void OnRectTransformDimensionsChange()
public virtual void OnRectTransformDimensionsChange()
{
}
public void OnRenderImage(RenderTexture src, RenderTexture dest)
public virtual void OnRenderImage(RenderTexture src, RenderTexture dest)
{
}
public void OnRenderObject()
public virtual void OnRenderObject()
{
}
public void OnServerInitialized()
public virtual void OnServerInitialized()
{
}
public void OnTransformChildrenChanged()
public virtual void OnTransformChildrenChanged()
{
}
public void OnTransformParentChanged()
public virtual void OnTransformParentChanged()
{
}
public void OnTriggerEnter(Collider other)
public virtual void OnTriggerEnter(Collider other)
{
}
public void OnTriggerEnter2D(Collider2D other)
public virtual void OnTriggerEnter2D(Collider2D other)
{
}
public void OnTriggerExit(Collider other)
public virtual void OnTriggerExit(Collider other)
{
}
public void OnTriggerExit2D(Collider2D other)
public virtual void OnTriggerExit2D(Collider2D other)
{
}
public void OnTriggerStay(Collider other)
public virtual void OnTriggerStay(Collider other)
{
}
public void OnTriggerStay2D(Collider2D other)
public virtual void OnTriggerStay2D(Collider2D other)
{
}
public void OnValidate()
public virtual void OnValidate()
{
}
public void OnWillRenderObject()
public virtual void OnWillRenderObject()
{
}
public void Reset()
public virtual void Reset()
{
}

View file

@ -35,22 +35,22 @@
<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll</HintPath>-->
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.CoreModule.dll</HintPath>-->
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>-->
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\ref\Gamecraft_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath>
<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath>
<!--<HintPath>..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath>-->
<Private>False</Private>
</Reference>
</ItemGroup>