Страницы

воскресенье, 21 мая 2017 г.

How Unity notifies about innerException: rethrow in stack

Suppose code:

public void TestCodeBelowRxChainExecutedDueExceptionHandled()
        {
            UiLogger.Trace("1");
            Observable.Return(1)
                .Select(a =>
                {
                    throw new InvalidOperationException("aa");
                    return a;
                })
                .Subscribe(
                    Actions.Empty,
                    exception => Debug.LogException(new AssertionFailedException(exception, "mmm assertion failed")); // (*)
            UiLogger.Trace("2"); // not reached if not (*)
        }

суббота, 13 мая 2017 г.

Unity's player setting Logging: ScriptOnly vs Full. What does it mean?

As said in docs, Full enables output of native stack traces in addition to managed once.
Example:

четверг, 11 мая 2017 г.

Rx in Unity with favor to synchronous code

Let's look at what rx is. Someone says it's about thinking of asynchronous operations as data flows and of rx operators as flow combining operations - join, merge, concat, transform (select/selectMany), etc. I prefer thinking that way. And yes, rx is somewhat about functional programming, it can be combined with LINQ.

воскресенье, 7 мая 2017 г.

Unity may lose frames in stacktrace: tests

I noticed that sometimes unity misses frames when crash occurs. So I decided to read code and do some tests.

суббота, 6 мая 2017 г.

What exactly does Debug.LogException in Unity

I noticed that sometimes Debug.LogException misses frames and/or adds wrong ones. So, I decided to test it. Results are below, tested in Unity 5.5.1f1.