Using the Simhub SDK
I am completely new in Simhub but my goal is to built my own plugins and do some calculations and evaluations with the data provided by simhub.
Can I find examples how to use the SDK?
I have some questions that might be answered by looking at an example:
- Is this the method that is called every 1/fps seconds? public void DataUpdate(PluginManager pluginManager, ref GameData data)
- How to access the gamedata (e.g. current gear)? data.gear?
- How can I activate the plugin?
Sorry for the very silly beginner questions... Maybe there is a tutorial somewhere which I didnt found...
Thanks in advance!
I've been searching for the same thing for weeks. I haven't found anything on how to create a dash from scratch or even edit one with specific controls.
Did you find something about that ? I am still searching from weeks, i really need it for schoolwork. If you know how please let me know, if i found how i will let you know too.
If it's any help https://github.com/simelation/simhub-plugins/tree/master/packages/simhub-sli-plugin I've documented it reasonably well, because my memory isn't great 😀 It probably breaks lots of best-practise rules for C# / WPF (what is MVVM, anyway?) but I'm an old C++ developer working a million miles away from UIs. That's my excuse anyway.
I've found the existing 'User.PluginSdkDemo' provided also to have a clear dependency on .NET framework 4.8 whilst the whole project is targeted for 4.7.2 which upon loading onto IDE raises all kinds of issues:
[warn]: OmniSharp.MSBuild.ProjectLoader The primary reference "SimHub.Plugins" could not be resolved because it has an indirect dependency on the assembly "GongSolutions.WPF.DragDrop, Version=184.108.40.206, Culture=neutral, PublicKeyToken=91f1945125b7a587" which was built against the ".NETFramework,Version=v4.8" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.7.2".
Perhaps something worth raising on Github so he can change the codebase.
@trey-ulbrayk: did you come across this by any chance? 2y ago code would likely be different from now.
This was visible through VSCode. Just get the actual Visual Studio and open the .sln and get the same error when building.
In Visual Studio, unload the project, change the project file TargetVersion as e.g.:
Reload the project.