Closed AmmarTee closed 2 years ago
Cannot replicate.
Please include all the requested information when making this ticket. My guess is you're using an untested version of Mirror (A shot in the dark).
Will re-open if can find something definitive to fix.
Try to do the same thing with two instances of windows build on same server and see what happens?
Sure I can try that.
I am using this modification in the Mp_vHitDamageParticles.CS and it is causing me the issue
using EMI.Object; using EMI.Utils; using UnityEngine; using Mirror;
namespace Invector { public class MP_vHitDamageParticle : vHitDamageParticle { [SerializeField, Tooltip("If you want to display self damage or not.")] protected bool displaySelfDamage = false; protected Team team = null; protected virtual void Awake() { team = (Team)gameObject.FindComponent(typeof(Team)); }
public override void OnReceiveDamage(vDamage damage) { // check teams don't show damage on friendly (if team component available) if (team == null || damage.sender == null || !damage.sender.transform.root.GetComponent<Team>() || ( damage.sender.transform.root.GetComponent<Team>() && damage.sender.transform.root.GetComponent<Team>().IsEnemy(team.teamName))) { // prevent self damage (if enabled) if (!displaySelfDamage && damage.sender != null && damage.sender.transform.root.gameObject.Equals(transform.root.gameObject)) return; if(damage.sender.transform.root.GetComponent<NetworkIdentity>().hasAuthority){ Debug.Log("Damaged"); } // past all checks (EX: Is enemy team and not damaging myself) base.OnReceiveDamage(damage); } } }
}
NullReferenceException:
Object reference not set to an instance of an object at EMI.UI.KillCounterPlayer.OnDamaged (Invector.vDamage damage) [0x00036] in <6a8f45902a504c83881fd5692e8db136>:0 at UnityEngine.Events.InvokableCall1[T1].Invoke (T1 args0) [0x00010] in <ad199b1c67244da3a5ed230e5d202f21>:0 at UnityEngine.Events.UnityEvent
1[T0].Invoke (T0 arg0) [0x00025] in`<6a8f45902a504c83881fd5692e8db136>:0
To recreate this bug: 1 - Join the server 2 - Fall from high place 3 - Bug