From f7ca00c9d989187379ca2e3a43410439fe70096b Mon Sep 17 00:00:00 2001 From: tymmkang Date: Sun, 16 Mar 2025 16:28:41 +0900 Subject: [PATCH] =?UTF-8?q?=EC=99=B8=EB=B6=80=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EC=A0=9D=ED=8A=B8=20=EC=9D=98=EC=A1=B4=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/GodotProject.sln | 33 +++++++++ Sources/GodotProject/GodotProject.csproj | 9 +++ Sources/GodotProject/LabelTest.cs | 13 ++++ Sources/GodotProject/LabelTest.cs.uid | 1 + Sources/GodotProject/Scripts/SampleScript0.cs | 6 ++ .../GodotProject/Scripts/SampleScript0.cs.uid | 1 + Sources/GodotProject/Scripts/SampleScript1.cs | 6 ++ .../GodotProject/Scripts/SampleScript1.cs.uid | 1 + Sources/GodotProject/export_presets.cfg | 69 +++++++++++++++++++ Sources/GodotProject/project.godot | 4 +- Sources/GodotProject/ui.tscn | 19 +++++ Sources/SampleLib/Class1.cs | 6 ++ Sources/SampleLib/SampleClass.cs | 15 ++++ Sources/SampleLib/SampleLib.csproj | 9 +++ 14 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 Sources/GodotProject.sln create mode 100644 Sources/GodotProject/GodotProject.csproj create mode 100644 Sources/GodotProject/LabelTest.cs create mode 100644 Sources/GodotProject/LabelTest.cs.uid create mode 100644 Sources/GodotProject/Scripts/SampleScript0.cs create mode 100644 Sources/GodotProject/Scripts/SampleScript0.cs.uid create mode 100644 Sources/GodotProject/Scripts/SampleScript1.cs create mode 100644 Sources/GodotProject/Scripts/SampleScript1.cs.uid create mode 100644 Sources/GodotProject/export_presets.cfg create mode 100644 Sources/GodotProject/ui.tscn create mode 100644 Sources/SampleLib/Class1.cs create mode 100644 Sources/SampleLib/SampleClass.cs create mode 100644 Sources/SampleLib/SampleLib.csproj diff --git a/Sources/GodotProject.sln b/Sources/GodotProject.sln new file mode 100644 index 0000000..892eb89 --- /dev/null +++ b/Sources/GodotProject.sln @@ -0,0 +1,33 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35825.156 d17.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodotProject", "GodotProject\GodotProject.csproj", "{3B34FBF4-4D2D-4607-A2D6-FFA589A72190}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLib", "SampleLib\SampleLib.csproj", "{BB1C699E-A92B-C5D4-04F5-2A09EF631836}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3B34FBF4-4D2D-4607-A2D6-FFA589A72190}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B34FBF4-4D2D-4607-A2D6-FFA589A72190}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B34FBF4-4D2D-4607-A2D6-FFA589A72190}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {3B34FBF4-4D2D-4607-A2D6-FFA589A72190}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {3B34FBF4-4D2D-4607-A2D6-FFA589A72190}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {3B34FBF4-4D2D-4607-A2D6-FFA589A72190}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + {BB1C699E-A92B-C5D4-04F5-2A09EF631836}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB1C699E-A92B-C5D4-04F5-2A09EF631836}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB1C699E-A92B-C5D4-04F5-2A09EF631836}.ExportDebug|Any CPU.ActiveCfg = Release|Any CPU + {BB1C699E-A92B-C5D4-04F5-2A09EF631836}.ExportDebug|Any CPU.Build.0 = Release|Any CPU + {BB1C699E-A92B-C5D4-04F5-2A09EF631836}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU + {BB1C699E-A92B-C5D4-04F5-2A09EF631836}.ExportRelease|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Sources/GodotProject/GodotProject.csproj b/Sources/GodotProject/GodotProject.csproj new file mode 100644 index 0000000..792e491 --- /dev/null +++ b/Sources/GodotProject/GodotProject.csproj @@ -0,0 +1,9 @@ + + + net8.0 + true + + + + + \ No newline at end of file diff --git a/Sources/GodotProject/LabelTest.cs b/Sources/GodotProject/LabelTest.cs new file mode 100644 index 0000000..5f4ee15 --- /dev/null +++ b/Sources/GodotProject/LabelTest.cs @@ -0,0 +1,13 @@ +using Godot; + +public partial class LabelTest : Label +{ + + public override void _Input(InputEvent @event) + { + if (@event is InputEventKey eventKey && eventKey.Pressed && eventKey.Keycode == Key.Space) + { + Text = SampleLib.SampleClass.SuperSampleString(); + } + } +} diff --git a/Sources/GodotProject/LabelTest.cs.uid b/Sources/GodotProject/LabelTest.cs.uid new file mode 100644 index 0000000..e4c40e5 --- /dev/null +++ b/Sources/GodotProject/LabelTest.cs.uid @@ -0,0 +1 @@ +uid://dxsuvw2yajgyl diff --git a/Sources/GodotProject/Scripts/SampleScript0.cs b/Sources/GodotProject/Scripts/SampleScript0.cs new file mode 100644 index 0000000..247c3bf --- /dev/null +++ b/Sources/GodotProject/Scripts/SampleScript0.cs @@ -0,0 +1,6 @@ +using Godot; +using System; + +public partial class SampleScript0 : Node +{ +} diff --git a/Sources/GodotProject/Scripts/SampleScript0.cs.uid b/Sources/GodotProject/Scripts/SampleScript0.cs.uid new file mode 100644 index 0000000..c33b8d1 --- /dev/null +++ b/Sources/GodotProject/Scripts/SampleScript0.cs.uid @@ -0,0 +1 @@ +uid://etelr8xonim3 diff --git a/Sources/GodotProject/Scripts/SampleScript1.cs b/Sources/GodotProject/Scripts/SampleScript1.cs new file mode 100644 index 0000000..428448b --- /dev/null +++ b/Sources/GodotProject/Scripts/SampleScript1.cs @@ -0,0 +1,6 @@ +using Godot; +using System; + +public partial class SampleScript1 : Node +{ +} diff --git a/Sources/GodotProject/Scripts/SampleScript1.cs.uid b/Sources/GodotProject/Scripts/SampleScript1.cs.uid new file mode 100644 index 0000000..e981965 --- /dev/null +++ b/Sources/GodotProject/Scripts/SampleScript1.cs.uid @@ -0,0 +1 @@ +uid://byg6x4ry4vic diff --git a/Sources/GodotProject/export_presets.cfg b/Sources/GodotProject/export_presets.cfg new file mode 100644 index 0000000..07e93e1 --- /dev/null +++ b/Sources/GodotProject/export_presets.cfg @@ -0,0 +1,69 @@ +[preset.0] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +advanced_options=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../../Export/Export.exe" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=true +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +binary_format/architecture="x86_64" +codesign/enable=false +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PackedStringArray() +application/modify_resources=true +application/icon="" +application/console_wrapper_icon="" +application/icon_interpolation=4 +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" +application/export_angle=0 +application/export_d3d12=0 +application/d3d12_agility_sdk_multiarch=true +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}' +$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}' +$trigger = New-ScheduledTaskTrigger -Once -At 00:00 +$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries +$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings +Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true +Start-ScheduledTask -TaskName godot_remote_debug +while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 } +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue" +ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue +Remove-Item -Recurse -Force '{temp_dir}'" +dotnet/include_scripts_content=false +dotnet/include_debug_symbols=true +dotnet/embed_build_outputs=true diff --git a/Sources/GodotProject/project.godot b/Sources/GodotProject/project.godot index 4575d9d..a2cab38 100644 --- a/Sources/GodotProject/project.godot +++ b/Sources/GodotProject/project.godot @@ -11,9 +11,11 @@ config_version=5 [application] config/name="GodotProject" -config/features=PackedStringArray("4.4", "Forward Plus") +run/main_scene="uid://drarxdqog4j2u" +config/features=PackedStringArray("4.4", "C#", "Forward Plus") config/icon="res://icon.svg" [dotnet] project/assembly_name="GodotProject" +project/solution_directory="../" diff --git a/Sources/GodotProject/ui.tscn b/Sources/GodotProject/ui.tscn new file mode 100644 index 0000000..c35eb0b --- /dev/null +++ b/Sources/GodotProject/ui.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=2 format=3 uid="uid://drarxdqog4j2u"] + +[ext_resource type="Script" uid="uid://dxsuvw2yajgyl" path="res://LabelTest.cs" id="1_fyqef"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Label" type="Label" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 1.0 +text = "가나라마바사" +script = ExtResource("1_fyqef") diff --git a/Sources/SampleLib/Class1.cs b/Sources/SampleLib/Class1.cs new file mode 100644 index 0000000..eeeb2f0 --- /dev/null +++ b/Sources/SampleLib/Class1.cs @@ -0,0 +1,6 @@ +namespace SampleLib; + +public class Class1 +{ + +} diff --git a/Sources/SampleLib/SampleClass.cs b/Sources/SampleLib/SampleClass.cs new file mode 100644 index 0000000..b4deead --- /dev/null +++ b/Sources/SampleLib/SampleClass.cs @@ -0,0 +1,15 @@ +namespace SampleLib +{ + public static class SampleClass + { + public static string GetSampleString() + { + return "Sample" + "String"; + } + + public static string SuperSampleString() + { + return "Super" + GetSampleString(); + } + } +} diff --git a/Sources/SampleLib/SampleLib.csproj b/Sources/SampleLib/SampleLib.csproj new file mode 100644 index 0000000..bb23fb7 --- /dev/null +++ b/Sources/SampleLib/SampleLib.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + +