Closed franktmy closed 3 months ago
Fixed:There isn't any error log on unity console when I add element to the list .
I can't reproduce it.
using ObservableCollections;
using R3;
using System;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
ObservableList<int> Observablelist = new ObservableList<int>();
void Start()
{
Observablelist.ObserveAdd()
.Subscribe(x =>
{
throw new SystemException("log error test");
});
Observablelist.Add(1);
}
}
I can't reproduce it.
using ObservableCollections; using R3; using System; using UnityEngine; public class NewBehaviourScript : MonoBehaviour { ObservableList<int> Observablelist = new ObservableList<int>(); void Start() { Observablelist.ObserveAdd() .Subscribe(x => { throw new SystemException("log error test"); }); Observablelist.Add(1); } }
I‘m sorry I don’t mention the actually vision,I'm in 6000.0.5f1 https://unity.com/cn/releases/editor/whats-new/6000.0.5
using ObservableCollections; using R3; using System; using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
ObservableList
void Start()
{
Debug.Log("I'm Start!");
Observablelist.ObserveAdd()
.Subscribe(x =>
{
throw new SystemException("log error test");
});
Observablelist.Add(1);
Debug.Log("I'm End!");
}
}
![屏幕截图 2024-07-23 092651](https://github.com/user-attachments/assets/2f803701-b040-4cbc-b058-460c6916a188)
![屏幕截图 2024-07-23 092332](https://github.com/user-attachments/assets/4a23c99a-1577-4f99-9e0e-23f44f10087e)
The latest seems to be 6000.0.11f1, so could you try 6000.0.11f1? Also, did you include R3 from PackageManager with the additional steps? If you don't include it, the unhandled exception will not be notified to the Unity Console.
You are right,the reason is I missed step 2: Install the R3.Unity package by referencing the git URL. Thank you for your patience.
When work with ObservableCollections.R3 in Unity 6.
Code is:
Observablelist.ObserveAdd() .Subscribe(x => { throw new SystemException("log error test"); });
There isn't any error log on the unity console,So how can I handle error in this case?