Closed fromanan closed 2 years ago
Hey, I couldn't reproduce the issue.
Test Configuration: Asset Release: 1.2.1 Unity Version: 2021.3.5f1 (LTS) Project Base: 3D Scripting Backend: both IL2CPP & Mono Api Compatibility Level: both .NET Standard 2.1 & .NET Framework
Test script:
using System;
using Baracuda.Monitoring;
public class TestBehaviour : MonitoredBehaviour
{
[Monitor] private bool _instanceField = true;
[Monitor] private int InstanceProperty { get; set; }
[Monitor] private event Action InstanceEvent;
[Monitor] private static int staticField = 234;
[Monitor] private static string StaticProperty { get; } = "Hello World";
[Monitor] private static event Action<bool> StaticEvent;
private void Update()
{
staticField++;
InstanceProperty++;
_instanceField = InstanceProperty % 2 == 0;
}
protected override void Awake()
{
base.Awake();
InstanceEvent += delegate { };
StaticEvent += delegate(bool b) { };
}
}
I also tested every configuration in the editor and in a packaged build (altough changing Mono to IL2CPP wont have any affect when testing in the editor because the editor will always use Mono) Everything worked as expected. Can you give me some more information. A look at the scipt with the monitored members, if you tested in the editor or in a packaged build etc. Thank you ;)
Unity Version: 2021.3.5f1 (LTS) Project Base: 3D
FIX In Settings -> Player: Switched scripting backend to IL2CPP and API Compatibility Level to .NET Framework