Skip to content

Commit

Permalink
Merge branch 'sam/feature/interpolation-for-network-transform' into s…
Browse files Browse the repository at this point in the history
…am/feature/client-network-transform

* sam/feature/interpolation-for-network-transform: (22 commits)
  fixing line issue
  more formatting
  fixing formatting issue
  removing not submitted LiteNetLib from ZooSam
  feat: Fast buffer reader and fast buffer writer (#1082)
  restricting public api
  bumping exec order
  feat: NetworkBehaviour.IsSpawned  (#1190)
  feat: added tip to the network manager inspector that directs to install tools (MTT-1211) (#1182)
  refactor!: remove network dictionary & set, use native container in List, add tests (#1149)
  fix: Fixed remote disconnects not properly cleaning up (#1184)
  test: base changes to PR-1114 (#1165)
  test: verify do not destroy networkobjects on networkmanager shutdown (#1183)
  chore: removal of EnableNetworkVariable in NetworkConfig. It's always True now (#1179)
  fix: Fix DontDestroyWithOwner not returning ownership (#1181)
  test: Giving Android some more room as the connection tests are timing sensitive (#1178)
  fix: unitytransport connectionmode buttons (#1176)
  test: added min frames to multi-instance helper (#1170)
  chore: Add mobile tests to nightly trigger (#1161)
  feat: snapshot spawn pre-requisite (#1166)
  ...

# Conflicts:
#	com.unity.netcode.gameobjects/Components/NetworkTransform.cs
#	testproject/Assets/Scenes/SampleScene.unity
  • Loading branch information
SamuelBellomo committed Sep 16, 2021
2 parents 353c12c + 39ec721 commit 722361a
Show file tree
Hide file tree
Showing 174 changed files with 18,045 additions and 2,162 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -4,5 +4,5 @@
Profiling/ @Unity-Technologies/multiplayer-tools
/com.unity.netcode.gameobjects/Runtime/Transports/ @Unity-Technologies/server-team
/com.unity.netcode.gameobjects/Runtime/SceneManagement/ @NoelStephensUnity
/com.unity.multiplayer.transport.utp/ @Unity-Technologies/server-team
/com.unity.netcode.adapter.utp/ @Unity-Technologies/server-team
Documentation~/ @Briancoughlin
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
.vs
.vscode
.idea
.DS_Store
2 changes: 2 additions & 0 deletions .yamato/_run-all.yml
Expand Up @@ -5,6 +5,8 @@ run_all_tests:
dependencies:
# Pull in package and validate jobs through the badges job
- .yamato/_triggers.yml#badges_test_trigger
- .yamato/mobile-build-and-test.yml#2021.2_Run_iOS_Player_With_Tests
- .yamato/mobile-build-and-test.yml#2021.2_Run_Android_Player_With_Tests
{% for platform in test_platforms -%}
{% for project in projects -%}
{% for editor in project.test_editors -%}
Expand Down
93 changes: 93 additions & 0 deletions .yamato/disable-burst-if-requested.py
@@ -0,0 +1,93 @@
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',
'DisableOptimisations': False,
'DisableSafetyChecks': True,
'DisableBurstCompilation': False
}

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, True)


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, False)


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']['DisableBurstCompilation'] = 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()
77 changes: 54 additions & 23 deletions .yamato/mobile-build-and-test.yml
Expand Up @@ -2,25 +2,32 @@
name: 2021.2 Build Android player
agent:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
image: desktop/android-execution-r19:v0.1.1-860408
flavor: b1.xlarge
commands:
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
- |
mkdir C:\TMP
cd C:\TMP
unity-downloader-cli -u 2021.2 -c editor -c Android -w --fast
- python .yamato/disable-burst-if-requested.py --project-path testproject --platform Android
- unity-downloader-cli -u 2021.2 -c editor -c Android -w --fast
- |
set UTR_VERSION=0.12.0
utr.bat --suite=playmode --platform=Android --editor-location=C:\TMP\.Editor --testproject=testproject --player-save-path=build/players --artifacts_path=build/logs --scripting-backend=il2cpp --build-only --testfilter=Unity.Netcode.RuntimeTests --extra-editor-arg=-nographics --timeout=1800 --extra-editor-arg=-batchmode --reruncount=2
utr.bat --artifacts_path=artifacts --timeout=1800 --testproject=testproject --editor-location=.Editor --suite=playmode --platform=android --build-only --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --testfilter=Unity.Netcode.RuntimeTests
artifacts:
players:
paths:
- "build/players/**"
logs:
paths:
- "build/logs/**"
paths:
- '*.log'
- '*.xml'
- artifacts/**/*
- testproject/Logs/**
- testproject/Library/*.log
- testproject/*.log
- testproject/Builds/*.log
- build/test-results/**
- artifacts/**
- build/players/**
variables:
CI: true
ENABLE_BURST_COMPILATION: False

2021.2_Build_iOS_player:
name: 2021.2 Build iOS player
Expand All @@ -34,14 +41,20 @@
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
- chmod +x ./utr
- export UTR_VERSION=0.12.0
- ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=testproject --player-save-path=build/players --artifacts_path=build/logs --build-only --testfilter=Unity.Netcode.RuntimeTests
- ./utr --artifacts_path=artifacts --timeout=1800 --testproject=testproject --editor-location=.Editor --suite=playmode --platform=iOS --build-only --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --testfilter=Unity.Netcode.RuntimeTests
artifacts:
players:
paths:
- "build/players/**"
logs:
paths:
- "build/logs/**"
paths:
- '*.log'
- '*.xml'
- artifacts/**/*
- testproject/Logs/**
- testproject/Library/*.log
- testproject/*.log
- testproject/Builds/*.log
- build/test-results/**
- artifacts/**
- build/players/**


2021.2_Run_iOS_Player_With_Tests:
Expand All @@ -61,11 +74,20 @@
- chmod +x ./utr
# Run the test build on the device
- export UTR_VERSION=0.12.0
- ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.Netcode.RuntimeTests
- ./utr -artifacts_path=artifacts --testproject=testproject --editor-location=.Editor --reruncount=2 --suite=playmode --platform=iOS --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
artifacts:
logs:
paths:
- "build/test-results/**"
paths:
- '*.log'
- '*.xml'
- artifacts/**/*
- testproject/Logs/**
- testproject/Library/*.log
- testproject/*.log
- testproject/Builds/*.log
- build/test-results/**
- artifacts/**
- build/players/**

2021.2_Run_Android_Player_With_Tests:
name: 2021.2 Run Android player with tests
Expand All @@ -85,9 +107,18 @@
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 --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.Netcode.RuntimeTests
./utr --artifacts_path=artifacts --testproject=testproject --editor-location=.Editor --reruncount=2 --suite=playmode --platform=android --player-connection-ip=%BOKKEN_HOST_IP% --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
# Set uploadable artifact paths
artifacts:
logs:
paths:
- "build/test-results/**"
- '*.log'
- '*.xml'
- artifacts/**/*
- testproject/Logs/**
- testproject/Library/*.log
- testproject/*.log
- testproject/Builds/*.log
- build/test-results/**
- artifacts/**
- build/players/**
4 changes: 2 additions & 2 deletions .yamato/project.metafile
Expand Up @@ -26,8 +26,8 @@ projects:
packages:
- name: com.unity.netcode.gameobjects
path: com.unity.netcode.gameobjects
- name: com.unity.multiplayer.transport.utp
path: com.unity.multiplayer.transport.utp
- name: com.unity.netcode.adapter.utp
path: com.unity.netcode.adapter.utp
test_editors:
- 2021.1
- 2021.2
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -30,9 +30,9 @@ We follow the [Gitflow Workflow](https://www.atlassian.com/git/tutorials/compari
This repository is broken into multiple components, each one implemented as a Unity Package.
```
.
├── com.unity.multiplayer.mlapi # The core netcode SDK unity package (source + tests)
├── com.unity.multiplayer.transport.utp # Transport wrapper for com.unity.transport experimental package (not currently supported)
└── testproject # A Unity project with various test implementations & scenes which exercise the features in the above package(s).
├── com.unity.multiplayer.mlapi # The core netcode SDK unity package (source + tests)
├── com.unity.netcode.adapter.utp # Transport wrapper for com.unity.transport experimental package (not currently supported)
└── testproject # A Unity project with various test implementations & scenes which exercise the features in the above package(s).
```

### Contributing
Expand Down

0 comments on commit 722361a

Please sign in to comment.