Cheo
Active member
Hello, ProjectileBase.Destruct was made public in 3.0.12 as I had personally requested, but that is actually not enough - the aim was to be able to call the Destruct void through the OnDeath event on a Health component, but the Destruct void either needs 2 Vector3 or a HitRaycast that can be null in its virtual version, but the latter can't be used through a Unity inspector event because we'd need to set the HitRaycast to null. So here's a simple workaround I made :
However, another problem has appeared : as strange as it may sound, I just checked with simple logs that this OnDeath event was not always called when the Health attribute reached zero ! It looks like it does when you shoot the two or three first grenades spawned into the scene, but after that the odds of the event being invoked decrease. I'm not seeing this on other objects though, only grenades. Could this please be looked into ? Thanks in advance.
C#:
public void DestructTest()
{
Destruct(null);
}
However, another problem has appeared : as strange as it may sound, I just checked with simple logs that this OnDeath event was not always called when the Health attribute reached zero ! It looks like it does when you shoot the two or three first grenades spawned into the scene, but after that the odds of the event being invoked decrease. I'm not seeing this on other objects though, only grenades. Could this please be looked into ? Thanks in advance.