diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc4e306..0f0b368 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - lfs: true + submodules: recursive - uses: actions/cache@v4 with: @@ -26,8 +26,4 @@ jobs: UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: githubToken: ${{ secrets.GITHUB_TOKEN }} - packageMode: true - projectPath: Packages/com.trytalo.talo unityVersion: 6000.0.28f1 - scopedRegistryUrl: https://package.openupm.com - registryScopes: 'com.mikeschweitzer.websocket' diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 650ad6d..7bd8fd4 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -7,57 +7,26 @@ jobs: release: runs-on: ubuntu-latest - env: - COMMIT_EMAIL: 7089284+tudddorrr@users.noreply.github.com - COMMIT_MESSAGE: "Release https://github.com/TaloDev/unity/releases/tag/${{ github.ref_name }}" - steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: actions/setup-node@v4 with: node-version: 20 - - name: Copy files - run: | - mkdir -p Release/Samples~ - cp -a Packages/com.trytalo.talo/. Release - cp -a Assets/Samples/. Release/Samples~ - - - name: Copy to package repo (main branch) - uses: tudddorrr/github-action-push-to-another-repository@main - if: "!contains(github.event.head_commit.message, '--no-release') && !contains(github.event.head_commit.message, 'pre.')" - env: - SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} - with: - source-directory: Release - destination-github-username: TaloDev - destination-repository-name: unity-package - user-email: ${{ env.COMMIT_EMAIL }} - commit-message: ${{ env.COMMIT_MESSAGE }} - - - name: Copy to package repo (version branch) - uses: tudddorrr/github-action-push-to-another-repository@main - env: - SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} + - name: Install Unity + uses: game-ci/unity-builder@v3 with: - source-directory: Release - destination-github-username: TaloDev - destination-repository-name: unity-package - user-email: ${{ env.COMMIT_EMAIL }} - commit-message: ${{ env.COMMIT_MESSAGE }} - target-branch: ${{ github.ref_name }} - - - name: Create artifact - run: | - cd Release - npm pack + unityVersion: 6000.0.28f1 - - name: Remove the version from the artifact name + - name: Create Unity Package run: | - filepath=$(ls Release/*.tgz) - new_filepath=$(echo "$filepath" | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+\.tgz$/.tgz/') - mv "$filepath" "$new_filepath" + mkdir -p Release + unity-editor -batchmode -nographics -quit \ + -projectPath "$(pwd)" \ + -exportPackage "Assets/Talo Game Services" "Release/talo.unitypackage" - name: Upload to itch uses: manleydev/butler-publish-itchio-action@master @@ -66,7 +35,7 @@ jobs: CHANNEL: package ITCH_GAME: talo-unity ITCH_USER: sleepystudios - PACKAGE: Release/com.trytalo.talo.tgz + PACKAGE: Release/talo.unitypackage VERSION: ${{ github.ref_name }} - name: Create release @@ -75,4 +44,4 @@ jobs: with: generate_release_notes: true prerelease: ${{ contains(github.event.head_commit.message, 'pre.') }} - files: Release/*.tgz + files: Release/talo.unitypackage diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ed9df38 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Assets/Talo Game Services/Talo/Runtime/Vendor/com.mikeschweitzer.websocket"] + path = Assets/Talo Game Services/Talo/Runtime/Vendor/com.mikeschweitzer.websocket + url = https://github.com/mikerochip/unity-websocket.git diff --git a/Assets/Samples/ChatDemo/Scripts/ChatUIController.cs b/Assets/Samples/ChatDemo/Scripts/ChatUIController.cs deleted file mode 100644 index d29483b..0000000 --- a/Assets/Samples/ChatDemo/Scripts/ChatUIController.cs +++ /dev/null @@ -1,163 +0,0 @@ -using UnityEngine; -using TaloGameServices; -using UnityEngine.UIElements; -using System.Collections.Generic; - -public class ChatUIController : MonoBehaviour -{ - public string playerUsername; - private int activeChannelId; - - private List messages = new List(); - private VisualElement root; - private ListView messagesList; - private VisualElement channelsList; - private TextField messageField; - private Button sendButton; - private TextField channelNameField; - private Button createButton; - - private async void Start() - { - root = GetComponent().rootVisualElement; - - InitMessagesList(); - messageField = root.Q("message"); - sendButton = root.Q