Skip to content

feat: Unity client SDK (continuation of #1105)#1516

Open
ChiragAgg5k wants to merge 166 commits intomasterfrom
unity-client-sdk-continued
Open

feat: Unity client SDK (continuation of #1105)#1516
ChiragAgg5k wants to merge 166 commits intomasterfrom
unity-client-sdk-continued

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

This PR continues the work started by @Fellmonkey in #1105 to add comprehensive Unity SDK support to the SDK generator.

What was done

  • Rebased/fetched the original unity-client-sdk branch from Unity client sdk #1105
  • Created a new branch unity-client-sdk-continued preserving all original commits from the community PR
  • Merged latest master and resolved conflicts (notably in templates/dotnet/Package/Models/Model.cs.twig)

Original PR content (from #1105)

  • Unity Language Implementation: Introduces a new Unity language class (src/SDK/Language/Unity.php) that extends the base Language class, providing Unity-specific type mappings, keywords, and code generation logic for C# in Unity environment.
  • Unity Template System: Adds a complete set of Unity-specific templates under templates/unity/Assets/ including:
    • Runtime components (Client, Services, Models, Enums, etc.)
    • Editor tools (Setup Assistant, Setup Window)
    • Unity project files (assembly definitions, project settings)
    • Required .NET libraries for Unity compatibility
  • Automated Testing Integration: Introduces Unity2021 test support with:
    • Unity2021Test.php test class that integrates with the existing test framework
    • Unity test source files (Tests.cs, Tests.asmdef) for comprehensive SDK testing
    • Docker-based Unity CI testing using unityci/editor:ubuntu-2021.3.45f1-base-3.1.0
  • CI/CD Integration: Updates the GitHub Actions workflow to:
    • Include Unity2021 in the test matrix alongside other SDK platforms
    • Set up the UNITY_LICENSE environment variable for Unity Editor automation
    • Enable automated testing of the Unity SDK in the CI pipeline
  • Unity Project Structure: Implements proper Unity package structure with:
    • Assets organized under Assets/Runtime/ and Assets/Editor/
    • Required Unity project settings and manifest files

Changes from original PR

  • Resolved merge conflicts with current master
  • Preserved all original author commits and attribution

Closes #1105

Moved Unity SDK template files from 'templates/unity/Runtime' and 'templates/unity/Editor' to 'templates/unity/Assets/Runtime' and 'templates/unity/Assets/Editor' for better alignment with Unity project conventions. Updated getFiles() in Unity.php to reflect new paths and added support for copying plugin DLLs and project settings. Improved file upload logic in Client.cs.twig to handle streams and byte arrays more robustly, and removed Unity-specific logging from Exception.cs.twig. Minor fixes in Realtime.cs.twig and Role.cs.twig for namespace and async handling.
Introduces Unity2021 test support by adding a Unity2021Test.php, Unity test source files, and updating the GitHub Actions workflow to include Unity2021 in the test matrix and set the UNITY_LICENSE environment variable. This enables automated testing for the Unity SDK within the CI pipeline.
Comment thread tests/Unity2021Test.php
Comment thread templates/unity/Assets/Runtime/Core/Client.cs.twig Outdated
Comment thread src/SDK/Language/DotNet.php
@ChiragAgg5k ChiragAgg5k force-pushed the unity-client-sdk-continued branch 4 times, most recently from 620a213 to 70f6e2f Compare May 11, 2026 03:22
Comment thread templates/unity/Assets/Runtime/Core/Client.cs.twig Outdated
Comment thread tests/languages/unity/Tests.cs Outdated
@ChiragAgg5k ChiragAgg5k force-pushed the unity-client-sdk-continued branch from 70f6e2f to 1f30f0d Compare May 11, 2026 03:59
Comment thread templates/unity/Assets/Runtime/Core/Client.cs.twig
@ChiragAgg5k ChiragAgg5k force-pushed the unity-client-sdk-continued branch 6 times, most recently from b4a302b to 00c4e0b Compare May 11, 2026 05:23
Comment thread templates/unity/Assets/Runtime/Core/Client.cs.twig
@ChiragAgg5k ChiragAgg5k force-pushed the unity-client-sdk-continued branch from 00c4e0b to 96474f5 Compare May 11, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants