Post by aric72 on Sept 4, 2020 3:54:30 GMT
some time i kiss targets and when target died, i have a error with this message :
MissingReferenceException: The object of type 'vControlAIMelee' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Invector.vCharacterController.AI.vControlAIEditor.DrawGizmos (Invector.vCharacterController.AI.vIControlAICombat combatControl) (at Assets/Packs/Invector/Invector-AI/Invector-AIController/Scripts/Editor/vControlAIEditor.cs:63)
Invector.vCharacterController.AI.vControlAIEditor.OnSceneGUI () (at Assets/Packs/Invector/Invector-AI/Invector-AIController/Scripts/Editor/vControlAIEditor.cs:46)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.SceneView.CallOnSceneGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.SceneView.OnGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.DockArea.OldOnGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <9c9fa79efe9e479a8cbe7a6f99f673d3>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
how can fix that ?
MissingReferenceException: The object of type 'vControlAIMelee' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Invector.vCharacterController.AI.vControlAIEditor.DrawGizmos (Invector.vCharacterController.AI.vIControlAICombat combatControl) (at Assets/Packs/Invector/Invector-AI/Invector-AIController/Scripts/Editor/vControlAIEditor.cs:63)
Invector.vCharacterController.AI.vControlAIEditor.OnSceneGUI () (at Assets/Packs/Invector/Invector-AI/Invector-AIController/Scripts/Editor/vControlAIEditor.cs:46)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.SceneView.CallOnSceneGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.SceneView.OnGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEditor.DockArea.OldOnGUI () (at <701f6580abad44cfb237a543dcd0d94b>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <9c9fa79efe9e479a8cbe7a6f99f673d3>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
how can fix that ?