-
Create a class that inherits from MonoBehavior and ICustomCubeBehaviour
-
Add a constructor that takes in an IntPtr and passes it to the base constructor
public MyCustomCubeBehavior(System.IntPtr ptr) : base(ptr) { }
-
Add these methods to your class
public void OnFragmentInitialized(CubeBase fragmentCubeBase) { } public void OnCollideWithCube(CubeBase colCubeBase) { }
-
At the end the class should look like this
public class MyCustomCubeBehavior : MonoBehaviour, ICustomCubeBehaviour
{
public MyCustomCubeBehavior(System.IntPtr ptr) : base(ptr){}
public void OnFragmentInitialized(CubeBase fragmentCubeBase)
{
}
public void OnCollideWithCube(CubeBase colCubeBase)
{
}
}
- Add this to OnApplicationStart if you haven't already (make sure you add this after
PMFSystem.EnableSystem<PMFHelper>();)PMFHelper.AutoInject(System.Reflection.Assembly.GetExecutingAssembly());