Skip to content

feat: merge develop #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
eef5e8d
feat: test utilities script including Playmode test helpers (#484)
fernando-cortez Apr 28, 2022
b7993ab
feat: hosting and disconnect smoke test for IP flow (#487)
fernando-cortez Apr 28, 2022
02209e5
feat: connection feedback + IP connection window [MTT-2315] [MTT-3234…
fernando-cortez May 3, 2022
f768ba4
First import of all the vandal imp artwork (#637)
jilfranco-unity May 3, 2022
01366bd
adding test constraint to test asmdef (#639)
fernando-cortez May 3, 2022
ba89580
feat: other players loading progress in loading screen [MTT-2239] (#580)
LPLafontaineB May 3, 2022
f214baf
feat: auto reconnect [MTT-2617] (#611)
LPLafontaineB May 3, 2022
7f039f3
chore: bump boss room to 2021 [MTT-3022] (#620)
SamuelBellomo May 4, 2022
3fdf11a
fix: folders and assemblies refactor MTT-2623, MTT-2615 (#628)
pdeschain May 5, 2022
962899c
moving scenebootstrapper to re-enable builds (#641)
fernando-cortez May 9, 2022
8f44725
feat: adding RNSM (Runtime Network Stats Monitor) to boss room [MTT-3…
SamuelBellomo May 9, 2022
57555f7
chore: formatting pass (#640)
fernando-cortez May 10, 2022
99f42d4
chore: bump NGO to pre.9 (#643)
SamuelBellomo May 10, 2022
0022336
Fixing 2021 new serialization and adding default namespace to editor …
SamuelBellomo May 10, 2022
c9e0b25
chore: Yamato jobs to trigger format & UPM project pack (#489)
fernando-cortez May 11, 2022
13640be
chore: adding template instructions and updating how we update our ch…
SamuelBellomo May 11, 2022
5dc6bd6
feat: change profile in-game [MTT-2809] (#636)
LPLafontaineB May 11, 2022
7c663fa
chore: remove UNET [MTT-3435] (#638)
LPLafontaineB May 12, 2022
4c9f2c6
fix: not enough progress bars exception [MTT-3499] (#644)
LPLafontaineB May 12, 2022
df9985d
Refactor: Shader and Material Consolidation [MTT-2900] (#648)
jilfranco-unity May 12, 2022
5e70190
docs: update architecture.md for transport picker removal (#651)
LPLafontaineB May 17, 2022
668f9fd
fix: remove initial ugs popup [MTT-3563] (#650)
LPLafontaineB May 17, 2022
ee7e376
docs: update readmes for new flow [MTT-3573] (#652)
LPLafontaineB May 17, 2022
f3557c7
unregister profile manager callback when leaving main menu (#655)
LPLafontaineB May 19, 2022
5044c7f
fix: loading progress bars mismatch (#654)
LPLafontaineB May 20, 2022
ca19d82
feat: scene parenting: editor time child scene loader for composed sc…
SamuelBellomo May 20, 2022
8f382e8
feat: Bumping relay version with qos (#657)
SamuelBellomo May 23, 2022
edd5b64
fix: auth signin error on startup [MTT-3581] (#658)
LPLafontaineB May 24, 2022
e05bfdf
feat: bad network conditions warning [MTT-3242] (#632)
LPLafontaineB May 24, 2022
15e0c70
fix: reduced scene load timeout (#635)
LPLafontaineB May 26, 2022
b9f3ecd
WIP CHANGELOG for 1.3.0, cleaned up a few things
SamuelBellomo May 26, 2022
399b05a
fix: bad network warning not deleted on despawn (#661)
LPLafontaineB May 26, 2022
52d13ce
Modified the click detection collision for the char select portraits …
jilfranco-unity May 27, 2022
b5bb8f9
Fix: Broken Shader References [MTT-3681] (#663)
jilfranco-unity May 27, 2022
cd71703
wrong formatting for changelog
SamuelBellomo May 27, 2022
f56c605
Adding default formatting for list items
SamuelBellomo May 27, 2022
7f9addb
Fixed Glowing Eyes on Characters on Low Android Settings (#665)
jilfranco-unity May 30, 2022
cf0a3af
Fixed Glitchy Boss Room Title in Post Game Scene on Mobile (#664)
jilfranco-unity May 30, 2022
3c9f73d
fix: no popup when incompatible build types [MTT-3689] (#667)
LPLafontaineB May 31, 2022
cba5bdf
feat: structure refactor (1): asmdefs and folder changes [MTT-2623] (…
pdeschain Jun 2, 2022
bcc5250
feat: structure refactor (2) remove bossroom folder [MTT-2623] (#669)
pdeschain Jun 2, 2022
04bf923
removed redundant bossroom/scripts and fixed the paths to scenes in b…
pdeschain Jun 2, 2022
80b1d14
feat: structure refactor (3) gameplay and infrastructure cleanup [MTT…
pdeschain Jun 2, 2022
c5f2f7f
Docs: Readme Image Updates [Skip CI] (#680)
jilfranco-unity Jun 14, 2022
46fde12
format: RotationLerper format fix (#681)
fernando-cortez Jun 15, 2022
43af734
fix: profile management UX [MTT-3762] (#677)
LPLafontaineB Jun 15, 2022
309ee34
feat: NetworkRigidbody-based toss action [MTT-2333] (#671)
fernando-cortez Jun 22, 2022
c6a20c3
feat: bumping to pre.10 (#678)
SamuelBellomo Jun 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
77 changes: 1 addition & 76 deletions .editorconfig

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
-->

### Contribution checklist
- [ ] Tests have been added for boss room and/or utilities pack
- [ ] Release notes have been added to the [project changelog](../CHANGELOG.md) file and/or [package changelog](../Packages/com.unity.multiplayer.samples.coop/CHANGELOG.md) file
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] JIRA ticket ID is in the PR title or at least one commit message
- [ ] Include the ticket ID number within the body message of the PR to create a hyperlink

27 changes: 27 additions & 0 deletions .yamato/_triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% metadata_file .yamato/project.metafile %}
---

# Run all relevant tasks when a pull request targeting specified
# branches is created or updated.
pull_request_trigger:
name: Pull Request Trigger (main, develop, & release branches)
dependencies:
- .yamato/project-standards.yml#standards_{{ projects.first.name }}
{% for project in projects -%}
{% for platform in test_platforms -%}
# desktop platforms
- .yamato/project-tests.yml#test_{{ project.name }}_{{ project.test_editors.first }}_{{ platform.name }}
{% endfor -%}
# iOS
- .yamato/mobile-build-and-run.yml#mobile_test_ios_{{ project.name }}_{{ project.test_editors.first }}
# Android
- .yamato/mobile-build-and-run.yml#mobile_test_android_{{ project.name }}_{{ project.test_editors.first }}
{% endfor -%}
triggers:
cancel_old_ci: true
pull_requests:
- targets:
only:
- "main"
- "develop"
- "/release\/.*/"
96 changes: 96 additions & 0 deletions .yamato/disable-burst-if-requested.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Custom python script to enable/disable burst compilations. Disabling burst is currently required for Android tests.
# Source: https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/blob/develop/.yamato/disable-burst-if-requested.py

import argparse
import json
import os


args = None
platform_plugin_definition = None


def resolve_target(platform):
resolved_target = platform
if 'StandaloneWindows' in platform:
resolved_target = 'StandaloneWindows'
elif 'StandaloneLinux' in platform:
resolved_target = 'StandaloneLinux64'

return resolved_target


def create_config(settings_path, platform):
config_name = os.path.join(settings_path, 'BurstAotSettings_{}.json'.format(resolve_target(platform)))
monobehaviour = {
'm_Enabled': True,
'm_EditorHideFlags': 0,
'm_Name': "",
'm_EditorClassIdentifier': 'Unity.Burst.Editor:Unity.Burst.Editor:BurstPlatformAotSettings',
'EnableOptimisations': True,
'EnableSafetyChecks': False,
'EnableBurstCompilation': True
}

data = {'MonoBehaviour': monobehaviour}
with open(config_name, 'w') as f:
json.dump(data, f)
return config_name


def get_or_create_AOT_config(project_path, platform):
settings_path = os.path.join(project_path, 'ProjectSettings')
if not os.path.isdir(settings_path):
os.mkdir(settings_path)
config_names = [os.path.join(settings_path, filename) for filename in os.listdir(settings_path) if filename.startswith("BurstAotSettings_{}".format(resolve_target(platform)))]
if not config_names:
return [create_config(settings_path, platform)]
return config_names


def disable_AOT(project_path, platform):
config_names = get_or_create_AOT_config(project_path, platform)
for config_name in config_names:
set_AOT(config_name, False)


def enable_AOT(project_path, platform):
config_names = get_or_create_AOT_config(project_path, platform)
for config_name in config_names:
set_AOT(config_name, True)


def set_AOT(config_file, status):
config = None
with open(config_file, 'r') as f:
config = json.load(f)

assert config is not None, 'AOT settings not found; did the burst-enabled build finish successfully?'

config['MonoBehaviour']['EnableBurstCompilation'] = status
with open(config_file, 'w') as f:
json.dump(config, f)


def main():
enable_burst = os.environ.get('ENABLE_BURST_COMPILATION', 'true').strip().lower()
if enable_burst == 'true':
print('BURST COMPILATION: ENABLED')
elif enable_burst == 'false':
print('BURST COMPILATION: DISABLED')
disable_AOT(args.project_path, args.platform)
else:
sys.exit('BURST COMPILATION: unexpected value: {}'.format(enable_burst))


def parse_args():
global args
parser = argparse.ArgumentParser(description='This tool disables burst AOT compilation')
parser.add_argument('--project-path', help='Specify the location of the unity project.')
parser.add_argument('--platform', help="Platform to be used to run the build.")
args = parser.parse_args()


if __name__ == '__main__':
parse_args()
main()
129 changes: 129 additions & 0 deletions .yamato/mobile-build-and-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Modeled after Yamato mobile automation example: https://github.cds.internal.unity3d.com/unity/mobile-yamato-example

{% metadata_file .yamato/project.metafile %}
---

{% for project in projects -%}
{% for editor in project.test_editors -%}
Build_Player_With_Tests_iOS_{{ project.name }}_{{ editor }}:
name: build {{ project.name }} - {{ editor }} on iOS
agent:
type: Unity::VM::osx
image: mobile/macos-10.15-testing:stable
flavor: b1.large

commands:
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -c Editor -c iOS -u {{ editor }} --fast --wait
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
- chmod +x ./utr
- ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only --testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime

artifacts:
players:
paths:
- "build/players/**"
logs:
paths:
- "build/logs/**"
{% endfor -%}
{% endfor -%}

{% for project in projects -%}
{% for editor in project.test_editors -%}
Build_Player_With_Tests_Android_{{ project.name }}_{{ editor }}:
name: build {{ project.name }} - {{ editor }} on Android
agent:
type: Unity::VM
# Any generic image can be used, no need to have Android tools in the image for building
# All Android tools will be downloaded by unity-downloader-cli
image: desktop/android-execution-r19:v0.1.1-860408
flavor: b1.xlarge

commands:
# Download unity-downloader-cli
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr.bat --output utr.bat
- python .yamato/disable-burst-if-requested.py --project-path {{ project.path }} --platform Android
- unity-downloader-cli -c Editor -c Android -u {{ editor }} --fast --wait
# Build player(s)
- set UTR_VERSION=0.12.0
- ./utr.bat --suite=playmode --platform=Android --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --scripting-backend=mono --build-only --testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
artifacts:
players:
paths:
- "build/players/**"
logs:
paths:
- "build/logs/**"
variables:
CI: true
ENABLE_BURST_COMPILATION: False
{% endfor -%}
{% endfor -%}

# For every editor version, run iOS project tests without
# running package tests too since they are handled on their respective jobs
{% for project in projects -%}
{% for editor in project.test_editors -%}
mobile_test_ios_{{ project.name }}_{{ editor }}:
name: {{ project.name }} mobile project tests - {{ editor }} on iOS
agent:
type: Unity::mobile::iPhone
image: mobile/macos-10.15-testing:latest
flavor: b1.medium

# Skip repository cloning
skip_checkout: true

# Set a dependency on the build job
dependencies:
- .yamato/mobile-build-and-run.yml#Build_Player_With_Tests_iOS_{{ project.name }}_{{ editor }}

commands:
# Download standalone UnityTestRunner
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
# Give UTR execution permissions
- chmod +x ./utr
# Run the test build on the device
- ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime

artifacts:
logs:
paths:
- "build/test-results/**"
{% endfor -%}
{% endfor -%}

# For every editor version, run Android project tests without
# running package tests too since they are handled on their respective jobs
{% for project in projects -%}
{% for editor in project.test_editors -%}
mobile_test_android_{{ project.name }}_{{ editor }}:
name: {{ project.name }} mobile project tests - {{ editor }} on Android
agent:
type: Unity::mobile::shield
image: mobile/android-execution-r19:stable
flavor: b1.medium

# Skip repository cloning
skip_checkout: true
# Set a dependency on the build job
dependencies:
- .yamato/mobile-build-and-run.yml#Build_Player_With_Tests_Android_{{ project.name }}_{{ editor }}
commands:
# Download standalone UnityTestRunner
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr.bat --output utr.bat
- |
set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
set UTR_VERSION=0.12.0
./utr --artifacts_path=build/test-results --testproject={{ project.path }} --editor-location=.Editor --reruncount=2 --suite=playmode --platform=android --player-connection-ip=%BOKKEN_HOST_IP% --player-load-path=build/players --testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
# Set uploadable artifact paths
artifacts:
logs:
paths:
- "build/test-results/**"
{% endfor -%}
{% endfor -%}
17 changes: 17 additions & 0 deletions .yamato/project-pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% metadata_file .yamato/project.metafile %}
---
{% for project in projects -%}
pack_{{ project.name }}:
name: Pack {{ project.name }}
agent:
type: Unity::VM
image: package-ci/ubuntu:stable
flavor: b1.small
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project pack --project-path {{ project.path }}
artifacts:
packages:
paths:
- "upm-ci~/packages/**/*"
{% endfor -%}
29 changes: 29 additions & 0 deletions .yamato/project-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% metadata_file .yamato/project.metafile %}
---

# For every platform and editor version, run its project tests without
# running package tests too since they are handled on their respective
# jobs
{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
name : {{ project.name }} project tests - {{ editor }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
- upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg=--testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/project-pack.yml#pack_{{ project.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
5 changes: 1 addition & 4 deletions .yamato/project.metafile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,4 @@ projects:
- name: com.unity.multiplayer.samples.coop
path: Packages/com.unity.multiplayer.samples.coop
test_editors:
- 2021.1
- 2021.2
- 2020.3
- trunk
- 2021.3
8 changes: 3 additions & 5 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Boss Room network connection flow is owned by the `GameNetPortal`:
Game data in Boss Room is defined in `ScriptableObjects`. The `ScriptableObjects` are organized by enum and made available in a singleton class: the `GameDataSource`, in particular `ActionDescription` and `CharacterData`. `Actions` represent discrete verbs (like swinging a weapon, or reviving someone), and are substantially data driven. Characters represent both the different player classes, and also monsters, and represent basic details like health, as well as what "Skill" Actions are available to each Character.

## Transports
Currently three network transport mechanisms are supported:
Currently two network transport mechanisms are supported:
- IP based
- Unity Relay Based

Expand All @@ -42,10 +42,8 @@ For Unity Relay based multiplayer sessions, some setup is required. Please see o

Please see [Multiplayer over internet](README.md) section of our Readme for more information on using either one.

To allow for any of these options to be chosen at runtime we created `TransportPicker`. It allows one to choose between an IP-based and a Relay-based transport and will hook up the game UI to use those transports. The transport field in the `NetworkManager` will be ignored. Currently we support the following transports:
- **UNET(IP):** UNET is the default Netcode transport. However, it is not the default IP transport for Boss Room.
- **UTP (IP):** Unity Transport Package is a network transport layer, packaged with network simulation tools which are useful for spotting networking issues early during development. This IP based protocol is the default IP transport for Boss Room. See the documentation on [Unity Transport Package](https://docs-multiplayer.unity3d.com/docs/transport-utp/about-transport-utp/#unity-transport-package-utp).
- **Unity (Relay):** Unity Relay is a relay service provided by Unity services, supported by Unity Transport. Read more about [Unity Relay](https://docs-multiplayer.unity3d.com/docs/relay/relay).
The transport is set in the transport field in the `NetworkManager`. We are using the following transport:
- **Unity Transport Package (UTP):** Unity Transport Package is a network transport layer, packaged with network simulation tools which are useful for spotting networking issues early during development. This protocol is initialized to use direct IP to connect, but is configured at runtime to use Unity Relay if starting a game as a host using the Lobby Service, or joining a Lobby as a client. Unity Relay is a relay service provided by Unity services, supported by Unity Transport. See the documentation on [Unity Transport Package](https://docs-multiplayer.unity3d.com/docs/transport-utp/about-transport-utp/#unity-transport-package-utp) and on [Unity Relay](https://docs-multiplayer.unity3d.com/docs/relay/relay).

To add new transports in the project, parts of `GameNetPortal` and `ClientGameNetPortal` (transport switches) need to be extended.

Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions Assets/BossRoom/Models/CharacterSet.fbx

This file was deleted.

Loading