Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# More details are here: https://help.github.com/articles/about-codeowners/

# The '*' pattern is global owners.

# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:

# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.

# Global rule:
* @Unity-Technologies/mtt-samples-dev
3 changes: 1 addition & 2 deletions Basic/2DSpaceShooter/Assets/Scripts/Asteroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ void Awake()
Assert.IsNotNull(m_ObjectPool, $"{nameof(NetworkObjectPool)} not found in scene. Did you apply the {s_ObjectPoolTag} to the GameObject?");
}

// Use this for initialization
void Start()
{
numAsteroids += 1;
Expand Down Expand Up @@ -61,7 +60,7 @@ public void Explode()
var go = m_ObjectPool.GetNetworkObject(asteroidPrefab, transform.position + diff, Quaternion.identity);

var asteroid = go.GetComponent<Asteroid>();
asteroid.Size.Value = newSize;
asteroid.Size = new NetworkVariable<int>(newSize);
asteroid.asteroidPrefab = asteroidPrefab;
go.GetComponent<NetworkObject>().Spawn();
go.GetComponent<Rigidbody2D>().AddForce(diff * 10, ForceMode2D.Impulse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
Expand Down
13 changes: 8 additions & 5 deletions Basic/2DSpaceShooter/Assets/Scripts/Spawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,19 @@ void SpawnAsteroids()
go.transform.position = new Vector3(Random.Range(-40, 40), Random.Range(-40, 40));

go.transform.localScale = new Vector3(4, 4, 4);
go.GetComponent<Asteroid>().Size.Value = 4;

var asteroid = go.GetComponent<Asteroid>();
asteroid.Size = new NetworkVariable<int>(4);

float dx = Random.Range(-40, 40) / 10.0f;
float dy = Random.Range(-40, 40) / 10.0f;
float dir = Random.Range(-40, 40);
go.transform.rotation = Quaternion.Euler(0, 0, dir);
go.GetComponent<Rigidbody2D>().angularVelocity = dir;
go.GetComponent<Rigidbody2D>().velocity = new Vector2(dx, dy);
go.GetComponent<Asteroid>().asteroidPrefab = m_AsteroidPrefab;
go.GetComponent<NetworkObject>().Spawn( true); // TODO
var rigidbody2D = go.GetComponent<Rigidbody2D>();
rigidbody2D.angularVelocity = dir;
rigidbody2D.velocity = new Vector2(dx, dy);
asteroid.asteroidPrefab = m_AsteroidPrefab;
asteroid.NetworkObject.Spawn(true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ MonoBehaviour:
type: 3}
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486,
type: 3}
dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92,
type: 3}
m_AssetVersion: 2
m_OpaqueLayerMask:
serializedVersion: 2
Expand Down
14 changes: 7 additions & 7 deletions Basic/2DSpaceShooter/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.ai.navigation": "1.1.3",
"com.unity.collab-proxy": "2.0.4",
"com.unity.ide.rider": "3.0.21",
"com.unity.ai.navigation": "1.1.4",
"com.unity.collab-proxy": "2.0.7",
"com.unity.ide.rider": "3.0.24",
"com.unity.ide.visualstudio": "2.0.18",
"com.unity.ide.vscode": "1.2.5",
"com.unity.multiplayer.samples.coop": "https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#v2.2.0",
"com.unity.netcode.gameobjects": "1.4.0",
"com.unity.multiplayer.samples.coop": "https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#v2.3.0",
"com.unity.netcode.gameobjects": "1.6.0",
"com.unity.postprocessing": "3.2.2",
"com.unity.render-pipelines.universal": "14.0.7",
"com.unity.render-pipelines.universal": "14.0.8",
"com.unity.test-framework": "1.1.33",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.7.4",
"com.unity.timeline": "1.7.5",
"com.unity.ugui": "1.0.0",
"com.veriorpies.parrelsync": "https://github.com/VeriorPies/ParrelSync.git?path=/ParrelSync#bb3d5067e49e403d8b8ba15c036d313b4dd2c696",
"com.unity.modules.ai": "1.0.0",
Expand Down
44 changes: 22 additions & 22 deletions Basic/2DSpaceShooter/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {}
},
"com.unity.ai.navigation": {
"version": "1.1.3",
"version": "1.1.4",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -16,7 +16,7 @@
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.8.4",
"version": "1.8.8",
"depth": 1,
"source": "registry",
"dependencies": {
Expand All @@ -25,7 +25,7 @@
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "2.0.4",
"version": "2.0.7",
"depth": 0,
"source": "registry",
"dependencies": {},
Expand Down Expand Up @@ -56,7 +56,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.21",
"version": "3.0.24",
"depth": 0,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -98,16 +98,16 @@
"url": "https://packages.unity.com"
},
"com.unity.multiplayer.samples.coop": {
"version": "https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#v2.2.0",
"version": "https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#v2.3.0",
"depth": 0,
"source": "git",
"dependencies": {
"com.unity.learn.iet-framework": "1.2.1",
"com.unity.learn.iet-framework": "3.1.3",
"com.unity.multiplayer.tools": "1.1.0",
"com.unity.netcode.gameobjects": "1.4.0",
"com.unity.services.relay": "1.0.3"
"com.unity.netcode.gameobjects": "1.6.0",
"com.unity.services.relay": "1.0.5"
},
"hash": "0cd402eaea1969d4e9f894a5bc6c90432e12ab02"
"hash": "a93b8cee21c60b890838405bb629d245cfae30e6"
},
"com.unity.multiplayer.tools": {
"version": "1.1.0",
Expand All @@ -123,12 +123,12 @@
"url": "https://packages.unity.com"
},
"com.unity.netcode.gameobjects": {
"version": "1.4.0",
"version": "1.6.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.nuget.mono-cecil": "1.10.1",
"com.unity.transport": "1.3.3"
"com.unity.transport": "1.3.4"
},
"url": "https://packages.unity.com"
},
Expand Down Expand Up @@ -163,7 +163,7 @@
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "14.0.7",
"version": "14.0.8",
"depth": 1,
"source": "builtin",
"dependencies": {
Expand All @@ -174,14 +174,14 @@
}
},
"com.unity.render-pipelines.universal": {
"version": "14.0.7",
"version": "14.0.8",
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.burst": "1.8.4",
"com.unity.render-pipelines.core": "14.0.7",
"com.unity.shadergraph": "14.0.7"
"com.unity.render-pipelines.core": "14.0.8",
"com.unity.shadergraph": "14.0.8"
}
},
"com.unity.searcher": {
Expand All @@ -192,19 +192,19 @@
"url": "https://packages.unity.com"
},
"com.unity.services.authentication": {
"version": "2.5.0",
"version": "2.7.2",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.services.core": "1.9.0",
"com.unity.services.core": "1.10.1",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.ugui": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.9.0",
"version": "1.11.0",
"depth": 2,
"source": "registry",
"dependencies": {
Expand All @@ -215,7 +215,7 @@
"url": "https://packages.unity.com"
},
"com.unity.services.qos": {
"version": "1.2.0",
"version": "1.2.1",
"depth": 2,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -253,11 +253,11 @@
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "14.0.7",
"version": "14.0.8",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "14.0.7",
"com.unity.render-pipelines.core": "14.0.8",
"com.unity.searcher": "4.9.2"
}
},
Expand All @@ -282,7 +282,7 @@
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.7.4",
"version": "1.7.5",
"depth": 0,
"source": "registry",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 53
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2727d53a542a4c1aa312905c3a02d807, type: 3}
m_Name:
m_EditorClassIdentifier:
NetworkPrefabsPath: Assets/DefaultNetworkPrefabs.asset
TempNetworkPrefabsPath: Assets/DefaultNetworkPrefabs.asset
GenerateDefaultNetworkPrefabs: 0
11 changes: 9 additions & 2 deletions Basic/2DSpaceShooter/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ PlayerSettings:
hideHomeButton: 0
submitAnalytics: 1
usePlayerLog: 1
dedicatedServerOptimizations: 0
bakeCollisionMeshes: 0
forceSingleInstance: 0
useFlipModelSwapchain: 1
Expand Down Expand Up @@ -125,6 +126,7 @@ PlayerSettings:
switchNVNMaxPublicTextureIDCount: 0
switchNVNMaxPublicSamplerIDCount: 0
switchNVNGraphicsFirmwareMemory: 32
switchMaxWorkerMultiple: 8
stadiaPresentMode: 0
stadiaTargetFramerate: 0
vulkanNumSwapchainBuffers: 3
Expand All @@ -133,7 +135,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 1.2.1
bundleVersion: 1.4.0
preloadedAssets: []
metroInputSource: 1
wsaTransparentSwapchain: 0
Expand All @@ -160,6 +162,7 @@ PlayerSettings:
tvOS: com.Company.ProductName
buildNumber:
Standalone: 0
VisionOS: 0
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
Expand All @@ -184,6 +187,8 @@ PlayerSettings:
tvOSSdkVersion: 0
tvOSRequireExtendedGameController: 0
tvOSTargetOSVersionString: 12.0
VisionOSSdkVersion: 0
VisionOSTargetOSVersionString: 1.0
uIPrerenderedIcon: 0
uIRequiresPersistentWiFi: 0
uIRequiresFullScreen: 1
Expand Down Expand Up @@ -231,8 +236,10 @@ PlayerSettings:
appleDeveloperTeamID:
iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID:
VisionOSManualSigningProvisioningProfileID:
iOSManualSigningProvisioningProfileType: 0
tvOSManualSigningProvisioningProfileType: 0
VisionOSManualSigningProvisioningProfileType: 0
appleEnableAutomaticSigning: 0
iOSRequireARKit: 0
iOSAutomaticallyDetectAndAddCapabilities: 1
Expand Down Expand Up @@ -817,6 +824,7 @@ PlayerSettings:
QNX: UNITY_POST_PROCESSING_STACK_V2
Stadia: UNITY_POST_PROCESSING_STACK_V2
Standalone: UNITY_POST_PROCESSING_STACK_V2
VisionOS: UNITY_POST_PROCESSING_STACK_V2
WebGL: UNITY_POST_PROCESSING_STACK_V2
Windows Store Apps: UNITY_POST_PROCESSING_STACK_V2
XboxOne: UNITY_POST_PROCESSING_STACK_V2
Expand Down Expand Up @@ -845,7 +853,6 @@ PlayerSettings:
suppressCommonWarnings: 1
allowUnsafeCode: 0
useDeterministicCompilation: 1
selectedPlatform: 0
additionalIl2CppArgs:
scriptingRuntimeVersion: 1
gcIncremental: 1
Expand Down
4 changes: 2 additions & 2 deletions Basic/2DSpaceShooter/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 2022.3.0f1
m_EditorVersionWithRevision: 2022.3.0f1 (fb119bb0b476)
m_EditorVersion: 2022.3.9f1
m_EditorVersionWithRevision: 2022.3.9f1 (ea401c316338)
18 changes: 17 additions & 1 deletion Basic/ClientDriven/Assets/Prefabs/Ingredient.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ GameObject:
- component: {fileID: 5818429371130516787}
- component: {fileID: 5607146804455042385}
- component: {fileID: 2549828380439460752}
- component: {fileID: -5120166168328346616}
m_Layer: 6
m_Name: Ingredient
m_TagString: Untagged
Expand All @@ -30,6 +31,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8321201880322001125}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -11.03, y: 1.42, z: 7.558644}
m_LocalScale: {x: 0.75, y: 0.75, z: 0.75}
Expand All @@ -41,7 +43,6 @@ Transform:
- {fileID: 2558306008476788773}
- {fileID: 7478805024049242977}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!135 &4840591773774142929
SphereCollider:
Expand Down Expand Up @@ -152,6 +153,7 @@ MonoBehaviour:
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &5607146804455042385
Expand Down Expand Up @@ -182,6 +184,20 @@ MonoBehaviour:
m_BlueMaterial: {fileID: 2100000, guid: b423dced7a4ac4f40a119b84a23cfc9b, type: 2}
m_RedMaterial: {fileID: 2100000, guid: d1a9058ddc5c2461298f65541af6fcd9, type: 2}
m_ColorMesh: {fileID: 6206319821543937579}
--- !u!114 &-5120166168328346616
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8321201880322001125}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 18eacd80d71f7c948a562ba85d3618d7, type: 3}
m_Name:
m_EditorClassIdentifier:
m_NetworkTransform: {fileID: 2014424453305718345}
m_Rigidbody: {fileID: 7759258758774188825}
--- !u!1001 &2596981318218469326
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
Loading