[ModApi] Exception thrown on IMyMotorStator.AttachedEntityChanged event handler register
Outdated
When we try to register an event handler for IMyMotorStator.AttachedEntityChanged, an exception is thrown:
Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.
The same exception is thrown on IMyLandingGear.LockModeChanged
Test code:
using Sandbox.Common.ObjectBuilders; using Sandbox.ModAPI; using VRage.Game.Components; using VRage.ModAPI; using VRage.ObjectBuilders; namespace Test { [MyEntityComponentDescriptor(typeof(MyObjectBuilder_MotorStator), false)] public class StatorLogic : MyGameLogicComponent { private IMyMotorStator _stator; public override void Close() { _stator.AttachedEntityChanged -= OnAttachedEntityChanged; } public override void Init(MyObjectBuilder_EntityBase objectBuilder) { _stator = Entity as IMyMotorStator; NeedsUpdate = MyEntityUpdateEnum.BEFORE_NEXT_FRAME; } public override void UpdateOnceBeforeFrame() { _stator.AttachedEntityChanged += OnAttachedEntityChanged; } private void OnAttachedEntityChanged(IMyMotorBase obj) { } } }
It is already fixed at least in version 1.190.1. I didn't check it before.
Maybe mark it as solved :D
It is already fixed at least in version 1.190.1. I didn't check it before.
Maybe mark it as solved :D
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
It is already fixed at least in version 1.190.1. I didn't check it before.
Maybe mark it as solved :D
It is already fixed at least in version 1.190.1. I didn't check it before.
Maybe mark it as solved :D
This is not fixed
This is not fixed
Replies have been locked on this page!