Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/BitStrap/Examples/MethodInjectionExample.cs
2026-02-21 16:45:37 +08:00

28 lines
599 B
C#

using System;
using UnityEngine;
namespace BitStrap.Examples
{
public class MethodInjectionExample : MonoBehaviour
{
[AttributeUsage(AttributeTargets.Method)]
public class SubstituteThisAttribute : Attribute
{
}
[Button]
public void CallProcessedMethod()
{
Debug.Log("Calling processed method.");
Debug.Log("Do not forget to enable Assembly Processing in Edit/Preferences/BitStrap!");
MethodToBeProcessed(17, "text");
}
[SubstituteThis]
public void MethodToBeProcessed(int integerArg, string stringArg)
{
Debug.Log("THIS IS THE DEFAULT METHOD BODY");
}
}
}