{"id":13702886,"url":"https://github.com/CATIA-Systems/Unity-FMI-Addon","last_synced_at":"2025-05-05T06:32:31.708Z","repository":{"id":109495183,"uuid":"137208528","full_name":"CATIA-Systems/Unity-FMI-Addon","owner":"CATIA-Systems","description":"Functional Mockup Interface (FMI) for Unity","archived":false,"fork":false,"pushed_at":"2018-06-19T17:07:25.000Z","size":309,"stargazers_count":42,"open_issues_count":9,"forks_count":14,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-13T10:37:45.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CATIA-Systems.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-06-13T11:49:42.000Z","updated_at":"2024-10-06T06:12:22.000Z","dependencies_parsed_at":"2023-07-14T22:00:24.775Z","dependency_job_id":null,"html_url":"https://github.com/CATIA-Systems/Unity-FMI-Addon","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CATIA-Systems%2FUnity-FMI-Addon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CATIA-Systems%2FUnity-FMI-Addon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CATIA-Systems%2FUnity-FMI-Addon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CATIA-Systems%2FUnity-FMI-Addon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CATIA-Systems","download_url":"https://codeload.github.com/CATIA-Systems/Unity-FMI-Addon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252451993,"owners_count":21750021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T21:00:45.394Z","updated_at":"2025-05-05T06:32:30.908Z","avatar_url":"https://github.com/CATIA-Systems.png","language":"C","funding_links":[],"categories":["FMI 2"],"sub_categories":["Tools"],"readme":"# Unity FMI Add-on\n\n[Functional Mock-up Interface](https://fmi-standard.org/) for [Unity](https://unity3d.com/)\n\n## Getting Started\n\nDownload and import the [Unity package](https://github.com/CATIA-Systems/Unity-FMI-Addon/releases). Select `Assets \u003e Import FMU` to import the FMU.\nThis creates the model description in `Resources` that lists the available variables and extracts the FMU to the\n`StreamingAssets` folder.\n\nNow you can use the FMU the in your scripts (see [BouncingBall.cs](Assets/SampleScenes/BouncingBall/BouncingBall.cs) for a complete example):\n\n```csharp\npublic class BouncingBall : MonoBehaviour {\n\n    FMU fmu;\n\n    void Start () {\n        fmu = new FMU2(\"bouncingBall\");\n        fmu.SetupExperiment(Time.time);\n        fmu.EnterInitializationMode();\n        fmu.ExitInitializationMode();\n    }\n\n    void FixedUpdate() {\n        fmu.DoStep(Time.time, Time.deltaTime);\n        transform.position = Vector3.up * (float)fmu.GetReal(\"h\");\n    }\n\n}\n```\n\nThe example scene `SampleScenes/BouncingBall` shows you how to instantiate and reset the model, set input and get output.\n\n![BouncingBall Scene](BouncingBall-Scene.png)\n\n[Values.cs](Assets/SampleScenes/Values/Values.cs) demonstrates how to use value references and to get and set `Real`, `Integer`, `Boolean` and `String` variables.\n\n\n## Limitations\n\nCurrently the FMI add-on supports only a limited subset of FMI 2.0 for co-simulation API. It runs on Mac and 64-bit Windows (make sure you select `x86_64` as architecture when exporting the player on Windows).\n\n\n## Get DotNetZip.dll\n\nIf you've cloned the repository you need to download [dotnetzip.1.11.0.nupgk](https://www.nuget.org/api/v2/package/DotNetZip/1.11.0), extract it (it's a ZIP archive) and copy `DotNetZip.dll` in `lib/net20` to `Unity/Assets/FMI/Editor/Plugins`. This library is required to extract FMUs during the import. DotNetZip.dll is already included in the pre-built Unity package.\n\n\n## Contributing\n\nYou've found a problem? Fantastic, a problem found is a problem fixed. Please take a moment to read the [contributing guide](CONTRIBUTING.md) before you [open an issue](https://github.com/CATIA-Systems/Unity-FMI-Addon/issues).\n\n\n## License\n\nThe code is licensed under the [BSD 3-clause license](LICENSE.md). Copyright \u0026copy; 2018 Dassault Syst\u0026egrave;mes. All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCATIA-Systems%2FUnity-FMI-Addon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCATIA-Systems%2FUnity-FMI-Addon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCATIA-Systems%2FUnity-FMI-Addon/lists"}