You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to make a plugin that uses the CarChanged event.
But when I open R3E and start a private session the method isn't called. I have also tried starting a new private session with other cars, but it's still not called. When using the replay feature the method is called but the newCar argument is null, and it's repeat itself multiple times. The amount of time the method is called is random, at least what I can see.
Third party plugins
I only have my plugin and Keyboard Input plugin active.
Expected behavior
I expected the event to be called when I change car and the event is called with valid newCar argument (not null and has the car name or ID).
Hi ! The car changed is only raised for a car change during a session, most of the time the car change will be tied to a new session and not trigger it.
To get more systematic event about it you can use PluginManagerEvents.Instance.ActiveCarChanged this event gets triggered everytime the car changes no matter the conditions.
Then you can access the current car name here : PluginManager.LastCarId
Describe the bug
I'm trying to make a plugin that uses the CarChanged event.
But when I open R3E and start a private session the method isn't called. I have also tried starting a new private session with other cars, but it's still not called. When using the replay feature the method is called but the newCar argument is null, and it's repeat itself multiple times. The amount of time the method is called is random, at least what I can see.
Simhub version
Simhub version 9.3.9
Third party plugins
I only have my plugin and Keyboard Input plugin active.
Expected behavior
I expected the event to be called when I change car and the event is called with valid newCar argument (not null and has the car name or ID).
Log files
SimHub.txt
SimHub.txt with debug logging
The text was updated successfully, but these errors were encountered: