{"id":16786358,"url":"https://github.com/willnationsdev/godot-fsharp-tools","last_synced_at":"2025-03-16T23:23:11.228Z","repository":{"id":48109578,"uuid":"198951623","full_name":"willnationsdev/godot-fsharp-tools","owner":"willnationsdev","description":"A Godot Engine plugin to simplify using F# through the C# Mono language.","archived":false,"fork":false,"pushed_at":"2022-07-27T04:51:50.000Z","size":280,"stargazers_count":81,"open_issues_count":3,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-23T09:32:56.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willnationsdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-26T05:24:18.000Z","updated_at":"2024-10-22T13:15:31.000Z","dependencies_parsed_at":"2022-08-28T20:40:42.892Z","dependency_job_id":null,"html_url":"https://github.com/willnationsdev/godot-fsharp-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnationsdev%2Fgodot-fsharp-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnationsdev%2Fgodot-fsharp-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnationsdev%2Fgodot-fsharp-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnationsdev%2Fgodot-fsharp-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willnationsdev","download_url":"https://codeload.github.com/willnationsdev/godot-fsharp-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945703,"owners_count":20372918,"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-10-13T08:12:02.041Z","updated_at":"2025-03-16T23:23:11.190Z","avatar_url":"https://github.com/willnationsdev.png","language":"GDScript","readme":"# Godot F# Tools\n\nA Godot Engine plugin to simplify using F# through the C# Mono language.\n\n## Features\n\n- Generating an F# project file and adding it to your Godot C# project/solution\n    - via Tools menu shortcut.\n- Generating an F# script from a selected C# script.\n    - via Tools menu shortcut.\n- Automatically Generating F# scripts from all C# scripts.\n    - via configuration in ProjectSettings under Mono \u003e F# Tools\n    - Note: All F# classes must have the same name as their C# counterpart with an \"Fs\" on the end, e.g. `MyClass.cs -\u003e MyClassFs.fs`.\n\n## How to install\n\n1. Download the .zip from GitHub or clone the repository.\n2. Copy/paste the `addons` directory into your project or create a symlink between the `addons/godot-fsharp-tools` directory and a similar one in your project.\n3. Open the ProjectSettings, go to the Plugins tab, find \"Godot F# Tools\" and switch it from \"Inactive\" to \"Active\" on the right-hand side.\n4. Make sure that you've installed the Mono version of Godot and the [dotnet](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x) command line tool of which this plugin makes heavy use.\n\n## How to use\n\nThese instructions assume that you...\n\n1. Have already created a C# project/solution by first creating at least one C# script in your Godot project.\n1. Have installed and activated the plugin.\n\n### Generate F# Project\n\n1. Go to `Project \u003e Tools \u003e Setup F# project...`. A dialog will open.\n1. Fill in the necessary fields. Unnecessary fields will tell you what default value they become if left empty.\n1. Once confirmed, the dialog will generate the F# project and connect it to your C# project/solution for you. This may take a short while.\n\n### Generate single F# script from a C# script\n\n1. Go to `Project \u003e Tools \u003e Generate F# script from C# script...`. A dialog will open.\n1. Fill in the necessary fields. Unnecessary fields will tell you what default value they become if left empty.\n    - The namespace must match that of the F# library project to which you plan to add it.\n1. Once confirmed, the dialog will generate the F# script and update the C# script to inherit from your F# class and include its namespace.\n1. You will need to add the new F# script file to your F# library project manually.\\*\n\n### Generate F# scripts from all created C# scripts\n\n1. Go to `Project \u003e ProjectSettings`. Go to the `General` tab. Scroll all the way to the bottom and find the `Mono \u003e F# Tools` category.\n1. Fill in information for all fields in this section.\n    - The namespace must match that of the F# library project to which you plan to add it.\n    - For better organization, we recommend using the F# library project directory for the output directory.\n1. Create a C# script. The editor will generate a corresponding F# script in the output directory and update the C# script to inherit from your F# class and include its namespace.\n1. You will need to add the new F# script file to your F# library project manually.\\*\n\n---\n\n\\* The reason you must do this manually is because...\n\n1. the `dotnet` tool from Microsoft does not support adding items to projects (\"Really? Seriously? Professional stuff here guys\").\n1. Godot's `XmlParser` class only allows you to read XML nodes, but not insert them into an .xml file (\"Really? I mean, that could be useful guys...\").\n1. If you want to write your own XML parsing code to inject the file reference into the `\u003cItemGroup\u003e` tag hierarchy, it would be appreciated.\n\nFor the uninformed, you add an existing item to an F# project in the following way:\n\n1. Have Visual Studio installed with F# support.\n1. Open the Godot .sln file in Visual Studio.\n1. Right click on the F# library project in the Solution Explorer dock.\n1. Go to `Add \u003e Add Existing Item...`.\n1. Choose the `\u003cclassname\u003eFs.fs` file you generated. Hit \"OK\".\n\nOR\n\n1. Have Visual Studio Code installed with the `Ionide-fsharp` extension.\n1. Open the Godot directory in your workspace. Ionide's F# solution tab should\nautomatically detect and add the F# project.\n1. In the F# tab on the left, you should see your project's .sln and under it the .csproj / .fsproj directories.\n1. Right-click the F# project directory. Choose `Add file`.\n1. Within the command pallete line edit, type out the name of the F# source file in that directory you want to add. Hit `Enter`.\n\nThe F# source file is now added to the F# project!\n\n---\n\nIf you like the project, please give it a star and consider donating to my [Kofi](https://ko-fi.com/willnationsdev). If you have any problems whatsoever, do not hesitate to open an Issue.\n","funding_links":["https://ko-fi.com/willnationsdev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillnationsdev%2Fgodot-fsharp-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillnationsdev%2Fgodot-fsharp-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillnationsdev%2Fgodot-fsharp-tools/lists"}