Attempting to delete a newly added camera throws an error, and the camera won't be deleted
Reproduce:
1, Add RutimeEditor prefab
2, Start Play
3, Add a Camera (opt.: turn off AudioListener to stop flooding the Console)
4, Delete Camera
An error appears on the Console
Attempting to delete a newly added camera throws an error, and the camera won't be deleted Reproduce:
1, Add RutimeEditor prefab 2, Start Play 3, Add a Camera (opt.: turn off AudioListener to stop flooding the Console) 4, Delete Camera An error appears on the Console
Unity 2021.3.1, RTE 3.5.0
NullReferenceException: Object reference not set to an instance of an object Battlehub.RTCommon.RuntimeObjects.InvokeIfExists (System.Object objectToCheck, System.String methodName, System.Object[] parameters) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RuntimeObjects.cs:687) Battlehub.RTCommon.RuntimeObjects.SendMessageTo (UnityEngine.GameObject gameobject, System.String methodName, System.Object[] parameters) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RuntimeObjects.cs:681) Battlehub.RTCommon.RuntimeObjects.OnMarkAsDestroyedChanging (Battlehub.RTCommon.ExposeToEditor obj) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RuntimeObjects.cs:660) Battlehub.RTCommon.ExposeToEditor.set_MarkAsDestroyed (System.Boolean value) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/ExposeToEditor.cs:127) Battlehub.RTCommon.RuntimeUndo.MarkAsDestroyed (Battlehub.RTCommon.Record record, System.Boolean destroyed) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RuntimeUndo.cs:1093) Battlehub.RTCommon.RuntimeUndo+<>cDisplayClass66_0.b0 (Battlehub.RTCommon.Record record) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RuntimeUndo.cs:1199)
Battlehub.RTCommon.Record.Redo () (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RuntimeUndo.cs:355)
Battlehub.RTCommon.RuntimeUndo.DestroyObjects (Battlehub.RTCommon.ExposeToEditor[] destoryedObjects, System.Action afterRedo, System.Action afterUndo) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RuntimeUndo.cs:1206)
Battlehub.RTCommon.RTEBase.Delete (UnityEngine.GameObject[] gameObjects) (at Assets/Battlehub/RTEditor/Runtime/RTCommon/RTEBase.cs:1168)
Battlehub.RTEditor.ViewModels.SceneViewModel.OnDelete () (at Assets/Battlehub/RTEditor/Runtime/RTEditor/ViewModels/SceneViewModel.cs:73)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <6073cf49ed704e958b8a66d540dea948>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <6073cf49ed704e958b8a66d540dea948>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <6073cf49ed704e958b8a66d540dea948>:0)
Battlehub.UIControls.Binding.ControlBinding+EventBindingSlim+<>cDisplayClass11_0.b 0 () (at Assets/Battlehub/RTEditor/Runtime/UIControls/UnityWeld/ControlBinding.cs:140)
UnityWeld.Binding.Internal.UnityEventBinder.EventHandler () (at <198fa614de5745f49c2d7c2cd3e40316>:0)
UnityEngine.Events.InvokableCall.Invoke () (at <823fb226a3f9439cb41fdcb61f9c86a1>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <823fb226a3f9439cb41fdcb61f9c86a1>:0)
Battlehub.RTEditor.Views.ViewInput.HandleInput () (at Assets/Battlehub/RTEditor/Runtime/RTEditor/Views/ViewInput.cs:84)
Battlehub.RTEditor.Views.SceneView.Update () (at Assets/Battlehub/RTEditor/Runtime/RTEditor/Views/SceneView.cs:74)