Skip to content

Commit ba8d22d

Browse files
test
- Adding `NetworkSceneManagerStartupTests` which validates this PR. - Adding the assets and script needed to validate this PR. - Updated scenes in build list to include the new scene: InSceneNetworkObjectMovesToDDOL.
1 parent 345e154 commit ba8d22d

7 files changed

Lines changed: 451 additions & 1 deletion

File tree

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!29 &1
4+
OcclusionCullingSettings:
5+
m_ObjectHideFlags: 0
6+
serializedVersion: 2
7+
m_OcclusionBakeSettings:
8+
smallestOccluder: 5
9+
smallestHole: 0.25
10+
backfaceThreshold: 100
11+
m_SceneGUID: 00000000000000000000000000000000
12+
m_OcclusionCullingData: {fileID: 0}
13+
--- !u!104 &2
14+
RenderSettings:
15+
m_ObjectHideFlags: 0
16+
serializedVersion: 10
17+
m_Fog: 0
18+
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19+
m_FogMode: 3
20+
m_FogDensity: 0.01
21+
m_LinearFogStart: 0
22+
m_LinearFogEnd: 300
23+
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24+
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25+
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26+
m_AmbientIntensity: 1
27+
m_AmbientMode: 0
28+
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29+
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30+
m_HaloStrength: 0.5
31+
m_FlareStrength: 1
32+
m_FlareFadeSpeed: 3
33+
m_HaloTexture: {fileID: 0}
34+
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35+
m_DefaultReflectionMode: 0
36+
m_DefaultReflectionResolution: 128
37+
m_ReflectionBounces: 1
38+
m_ReflectionIntensity: 1
39+
m_CustomReflection: {fileID: 0}
40+
m_Sun: {fileID: 0}
41+
m_UseRadianceAmbientProbe: 0
42+
--- !u!157 &3
43+
LightmapSettings:
44+
m_ObjectHideFlags: 0
45+
serializedVersion: 13
46+
m_BakeOnSceneLoad: 0
47+
m_GISettings:
48+
serializedVersion: 2
49+
m_BounceScale: 1
50+
m_IndirectOutputScale: 1
51+
m_AlbedoBoost: 1
52+
m_EnvironmentLightingMode: 0
53+
m_EnableBakedLightmaps: 1
54+
m_EnableRealtimeLightmaps: 0
55+
m_LightmapEditorSettings:
56+
serializedVersion: 12
57+
m_Resolution: 2
58+
m_BakeResolution: 40
59+
m_AtlasSize: 1024
60+
m_AO: 0
61+
m_AOMaxDistance: 1
62+
m_CompAOExponent: 1
63+
m_CompAOExponentDirect: 0
64+
m_ExtractAmbientOcclusion: 0
65+
m_Padding: 2
66+
m_LightmapParameters: {fileID: 0}
67+
m_LightmapsBakeMode: 1
68+
m_TextureCompression: 1
69+
m_ReflectionCompression: 2
70+
m_MixedBakeMode: 2
71+
m_BakeBackend: 1
72+
m_PVRSampling: 1
73+
m_PVRDirectSampleCount: 32
74+
m_PVRSampleCount: 512
75+
m_PVRBounces: 2
76+
m_PVREnvironmentSampleCount: 256
77+
m_PVREnvironmentReferencePointCount: 2048
78+
m_PVRFilteringMode: 1
79+
m_PVRDenoiserTypeDirect: 1
80+
m_PVRDenoiserTypeIndirect: 1
81+
m_PVRDenoiserTypeAO: 1
82+
m_PVRFilterTypeDirect: 0
83+
m_PVRFilterTypeIndirect: 0
84+
m_PVRFilterTypeAO: 0
85+
m_PVREnvironmentMIS: 1
86+
m_PVRCulling: 1
87+
m_PVRFilteringGaussRadiusDirect: 1
88+
m_PVRFilteringGaussRadiusIndirect: 5
89+
m_PVRFilteringGaussRadiusAO: 2
90+
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
91+
m_PVRFilteringAtrousPositionSigmaIndirect: 2
92+
m_PVRFilteringAtrousPositionSigmaAO: 1
93+
m_ExportTrainingData: 0
94+
m_TrainingDataDestination: TrainingData
95+
m_LightProbeSampleCountMultiplier: 4
96+
m_LightingDataAsset: {fileID: 0}
97+
m_LightingSettings: {fileID: 0}
98+
--- !u!196 &4
99+
NavMeshSettings:
100+
serializedVersion: 2
101+
m_ObjectHideFlags: 0
102+
m_BuildSettings:
103+
serializedVersion: 3
104+
agentTypeID: 0
105+
agentRadius: 0.5
106+
agentHeight: 2
107+
agentSlope: 45
108+
agentClimb: 0.4
109+
ledgeDropHeight: 0
110+
maxJumpAcrossDistance: 0
111+
minRegionArea: 2
112+
manualCellSize: 0
113+
cellSize: 0.16666667
114+
manualTileSize: 0
115+
tileSize: 256
116+
buildHeightMesh: 0
117+
maxJobWorkers: 0
118+
preserveTilesOutsideBounds: 0
119+
debug:
120+
m_Flags: 0
121+
m_NavMeshData: {fileID: 0}
122+
--- !u!1 &1633685737
123+
GameObject:
124+
m_ObjectHideFlags: 0
125+
m_CorrespondingSourceObject: {fileID: 0}
126+
m_PrefabInstance: {fileID: 0}
127+
m_PrefabAsset: {fileID: 0}
128+
serializedVersion: 6
129+
m_Component:
130+
- component: {fileID: 1633685739}
131+
- component: {fileID: 1633685738}
132+
- component: {fileID: 1633685740}
133+
m_Layer: 0
134+
m_Name: InSceneObject
135+
m_TagString: Untagged
136+
m_Icon: {fileID: 0}
137+
m_NavMeshLayer: 0
138+
m_StaticEditorFlags: 0
139+
m_IsActive: 1
140+
--- !u!114 &1633685738
141+
MonoBehaviour:
142+
m_ObjectHideFlags: 0
143+
m_CorrespondingSourceObject: {fileID: 0}
144+
m_PrefabInstance: {fileID: 0}
145+
m_PrefabAsset: {fileID: 0}
146+
m_GameObject: {fileID: 1633685737}
147+
m_Enabled: 1
148+
m_EditorHideFlags: 0
149+
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
150+
m_Name:
151+
m_EditorClassIdentifier:
152+
GlobalObjectIdHash: 974939462
153+
InScenePlacedSourceGlobalObjectIdHash: 0
154+
DeferredDespawnTick: 0
155+
Ownership: 1
156+
AlwaysReplicateAsRoot: 0
157+
SynchronizeTransform: 1
158+
m_InScenePlaced: 1
159+
ActiveSceneSynchronization: 0
160+
SceneMigrationSynchronization: 0
161+
SpawnWithObservers: 1
162+
DontDestroyWithOwner: 0
163+
AutoObjectParentSync: 1
164+
SyncOwnerTransformWhenParented: 1
165+
AllowOwnerToParent: 0
166+
--- !u!4 &1633685739
167+
Transform:
168+
m_ObjectHideFlags: 0
169+
m_CorrespondingSourceObject: {fileID: 0}
170+
m_PrefabInstance: {fileID: 0}
171+
m_PrefabAsset: {fileID: 0}
172+
m_GameObject: {fileID: 1633685737}
173+
serializedVersion: 2
174+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
175+
m_LocalPosition: {x: 0, y: 0, z: 0}
176+
m_LocalScale: {x: 1, y: 1, z: 1}
177+
m_ConstrainProportionsScale: 0
178+
m_Children: []
179+
m_Father: {fileID: 0}
180+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
181+
--- !u!114 &1633685740
182+
MonoBehaviour:
183+
m_ObjectHideFlags: 0
184+
m_CorrespondingSourceObject: {fileID: 0}
185+
m_PrefabInstance: {fileID: 0}
186+
m_PrefabAsset: {fileID: 0}
187+
m_GameObject: {fileID: 1633685737}
188+
m_Enabled: 1
189+
m_EditorHideFlags: 0
190+
m_Script: {fileID: 11500000, guid: 112072ebb4fab6341bfee4bd9d7e58da, type: 3}
191+
m_Name:
192+
m_EditorClassIdentifier: TestProject.ManualTests::TestProject.ManualTests.MoveInScenePlacedToDDOL
193+
ShowTopMostFoldoutHeaderGroup: 1
194+
--- !u!1660057539 &9223372036854775807
195+
SceneRoots:
196+
m_ObjectHideFlags: 0
197+
m_Roots:
198+
- {fileID: 1633685739}

testproject/Assets/Tests/Manual/IntegrationTestScenes/InSceneNetworkObjectMovesToDDOL.unity.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Unity.Netcode;
2+
using UnityEngine;
3+
4+
namespace TestProject.ManualTests
5+
{
6+
public class MoveInScenePlacedToDDOL : NetworkBehaviour
7+
{
8+
public bool ProcessedRpc { get; private set; }
9+
10+
private void Awake()
11+
{
12+
ProcessedRpc = false;
13+
var networkObject = GetComponent<NetworkObject>();
14+
Debug.Log($"[{name}][Moving to DDOL] InScenePlaced: {networkObject.InScenePlaced}");
15+
DontDestroyOnLoad(gameObject);
16+
}
17+
18+
protected override void OnNetworkPostSpawn()
19+
{
20+
if (HasAuthority)
21+
{
22+
SendOnSpawnRpc();
23+
}
24+
25+
base.OnNetworkPostSpawn();
26+
}
27+
28+
[Rpc(SendTo.Everyone)]
29+
private void SendOnSpawnRpc(RpcParams rpcParams = default)
30+
{
31+
ProcessedRpc = true;
32+
}
33+
}
34+
}

testproject/Assets/Tests/Manual/Scripts/MoveInScenePlacedToDDOL.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)