Author a bootstrap scene first approach
This commit is contained in:
@@ -29,8 +29,7 @@ Transform:
|
||||
m_LocalPosition: {x: -3.4031, y: -1.84829, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7090108953567368886}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5327225408302228741
|
||||
@@ -45,125 +44,3 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 360f320f4d7a48e38f5fd7cdfa28144a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
loadingScreen: {fileID: 3391437592962192360}
|
||||
--- !u!1001 &6967569849783118800
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 3506046067200272545}
|
||||
m_Modifications:
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4869161796575291839, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: LoadingScreen
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4869161796575291839, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5737877680156686392, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: minimumDisplayTime
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
--- !u!114 &3391437592962192360 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5737877680156686392, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_PrefabInstance: {fileID: 6967569849783118800}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1494b10574e74acd880f9101b4248239, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::UI.LoadingScreenController
|
||||
--- !u!224 &7090108953567368886 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_PrefabInstance: {fileID: 6967569849783118800}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
409
Assets/Scenes/StartingScene.unity
Normal file
409
Assets/Scenes/StartingScene.unity
Normal file
@@ -0,0 +1,409 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &400217123
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400217126}
|
||||
- component: {fileID: 400217125}
|
||||
- component: {fileID: 400217124}
|
||||
- component: {fileID: 400217127}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &400217124
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &400217125
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &400217126
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &400217127
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
m_Version: 2
|
||||
--- !u!1001 &1355357999
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4869161796575291839, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: LoadingScreen
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
--- !u!1 &1710655392
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1710655394}
|
||||
- component: {fileID: 1710655393}
|
||||
m_Layer: 0
|
||||
m_Name: BootSceneController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1710655393
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1710655392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fdb797d6fcdc469bb9bfb9ad3c5f51b5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::Bootstrap.BootSceneController
|
||||
mainMenuSceneName: MainMenu
|
||||
minDelayAfterBoot: 0.5
|
||||
debugMode: 0
|
||||
--- !u!4 &1710655394
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1710655392}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -39.55614, y: 4.31573, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 400217126}
|
||||
- {fileID: 1355357999}
|
||||
- {fileID: 1710655394}
|
||||
7
Assets/Scenes/StartingScene.unity.meta
Normal file
7
Assets/Scenes/StartingScene.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf01e2d0135b06c4486d00ef393d0274
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
127
Assets/Scripts/Bootstrap/BootSceneController.cs
Normal file
127
Assets/Scripts/Bootstrap/BootSceneController.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UI;
|
||||
using Core;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Bootstrap
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller for the boot scene that coordinates bootstrap initialization with loading screen
|
||||
/// </summary>
|
||||
public class BootSceneController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private string mainMenuSceneName = "MainMenu";
|
||||
[SerializeField] private float minDelayAfterBoot = 0.5f; // Small delay after boot to ensure smooth transition
|
||||
[SerializeField] private bool debugMode = false;
|
||||
|
||||
private bool _bootComplete = false;
|
||||
private bool _hasStartedLoading = false;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Debug.Log("[BootSceneController] Boot scene started");
|
||||
|
||||
// Ensure the loading screen controller exists
|
||||
if (LoadingScreenController.Instance == null)
|
||||
{
|
||||
Debug.LogError("[BootSceneController] No LoadingScreenController found in the scene!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Show the loading screen immediately
|
||||
LoadingScreenController.Instance.ShowLoadingScreen(
|
||||
// Use the CustomBoot progress as the progress provider
|
||||
progressProvider: () => CustomBoot.CurrentProgress,
|
||||
// When loading screen is fully hidden, load main menu
|
||||
onComplete: () => LoadMainMenu()
|
||||
);
|
||||
|
||||
// Start the boot process if not already initialized
|
||||
if (!CustomBoot.Initialised)
|
||||
{
|
||||
// Subscribe to the boot completion event
|
||||
CustomBoot.OnBootCompleted += OnBootCompleted;
|
||||
CustomBoot.OnBootProgressChanged += OnBootProgressChanged;
|
||||
|
||||
// Start initialization
|
||||
CustomBoot.PerformInitialisation();
|
||||
}
|
||||
else
|
||||
{
|
||||
// If already initialized (can happen in editor testing), proceed immediately
|
||||
Debug.Log("[BootSceneController] Bootstrap already initialized, proceeding to main menu");
|
||||
OnBootCompleted();
|
||||
}
|
||||
|
||||
// In debug mode, log additional information
|
||||
if (debugMode)
|
||||
{
|
||||
InvokeRepeating(nameof(LogDebugInfo), 0.1f, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Clean up event subscriptions
|
||||
CustomBoot.OnBootCompleted -= OnBootCompleted;
|
||||
CustomBoot.OnBootProgressChanged -= OnBootProgressChanged;
|
||||
|
||||
if (debugMode)
|
||||
{
|
||||
CancelInvoke(nameof(LogDebugInfo));
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBootProgressChanged(float progress)
|
||||
{
|
||||
if (debugMode)
|
||||
{
|
||||
Debug.Log($"[BootSceneController] Boot progress: {progress:P0}");
|
||||
}
|
||||
}
|
||||
|
||||
private void LogDebugInfo()
|
||||
{
|
||||
Debug.Log($"[BootSceneController] Debug - Boot Progress: {CustomBoot.CurrentProgress:P0}, Boot Complete: {_bootComplete}, Loading Started: {_hasStartedLoading}");
|
||||
}
|
||||
|
||||
private void OnBootCompleted()
|
||||
{
|
||||
// Unsubscribe to prevent duplicate calls
|
||||
CustomBoot.OnBootCompleted -= OnBootCompleted;
|
||||
|
||||
Debug.Log("[BootSceneController] Boot process completed");
|
||||
_bootComplete = true;
|
||||
|
||||
// After a small delay, tell the loading screen we're done
|
||||
// This prevents jerky transitions if boot happens very quickly
|
||||
Invoke(nameof(CompleteLoadingScreen), minDelayAfterBoot);
|
||||
}
|
||||
|
||||
private void CompleteLoadingScreen()
|
||||
{
|
||||
Debug.Log("[BootSceneController] Hiding loading screen");
|
||||
|
||||
// Tell loading screen that loading is complete
|
||||
if (LoadingScreenController.Instance != null)
|
||||
{
|
||||
LoadingScreenController.Instance.HideLoadingScreen();
|
||||
}
|
||||
}
|
||||
|
||||
private async void LoadMainMenu()
|
||||
{
|
||||
// Prevent multiple scene loads
|
||||
if (_hasStartedLoading)
|
||||
return;
|
||||
|
||||
_hasStartedLoading = true;
|
||||
Debug.Log($"[BootSceneController] Loading main menu scene: {mainMenuSceneName}");
|
||||
|
||||
// Load the main menu scene
|
||||
var progress = new Progress<float>(p => Debug.Log($"Loading main menu: {p * 100:F0}%"));
|
||||
await SceneManagerService.Instance.SwitchSceneAsync(mainMenuSceneName, progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Bootstrap/BootSceneController.cs.meta
Normal file
3
Assets/Scripts/Bootstrap/BootSceneController.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdb797d6fcdc469bb9bfb9ad3c5f51b5
|
||||
timeCreated: 1760604860
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
@@ -14,9 +15,24 @@ namespace Bootstrap
|
||||
/// Current initialisation status
|
||||
/// </summary>
|
||||
public static bool Initialised { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when boot progress changes
|
||||
/// </summary>
|
||||
public static event Action<float> OnBootProgressChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when boot process completes
|
||||
/// </summary>
|
||||
public static event Action OnBootCompleted;
|
||||
|
||||
/// <summary>
|
||||
/// Current progress of the boot process (0-1)
|
||||
/// </summary>
|
||||
public static float CurrentProgress { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
// Called as soon as the game begins
|
||||
/// Called as soon as the game begins
|
||||
/// </summary>
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
|
||||
private static void Initialise()
|
||||
@@ -32,6 +48,9 @@ namespace Bootstrap
|
||||
/// </summary>
|
||||
public static void PerformInitialisation()
|
||||
{
|
||||
//Reset progress
|
||||
CurrentProgress = 0f;
|
||||
|
||||
//In editor, perform initialisation synchronously
|
||||
if (Application.isEditor)
|
||||
{
|
||||
@@ -72,6 +91,9 @@ namespace Bootstrap
|
||||
{
|
||||
await LoadCustomBootSettings();
|
||||
Initialised = true;
|
||||
CurrentProgress = 1f;
|
||||
OnBootProgressChanged?.Invoke(1f);
|
||||
OnBootCompleted?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -81,6 +103,9 @@ namespace Bootstrap
|
||||
{
|
||||
LoadCustomBootSettingsSync();
|
||||
Initialised = true;
|
||||
CurrentProgress = 1f;
|
||||
OnBootProgressChanged?.Invoke(1f);
|
||||
OnBootCompleted?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
@@ -177,5 +202,16 @@ namespace Bootstrap
|
||||
result.InitialiseSync();
|
||||
return handle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the current progress value and triggers the progress event
|
||||
/// </summary>
|
||||
/// <param name="progress">Progress value between 0-1</param>
|
||||
internal static void UpdateProgress(float progress)
|
||||
{
|
||||
CurrentProgress = Mathf.Clamp01(progress);
|
||||
OnBootProgressChanged?.Invoke(CurrentProgress);
|
||||
Debug.Log($"[CustomBoot] Progress: {CurrentProgress:P0}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,15 +31,37 @@ namespace Bootstrap
|
||||
RuntimeContainer = new GameObject($"{name}_Container");
|
||||
DontDestroyOnLoad(RuntimeContainer);
|
||||
Instances = new GameObject[BootPrefabs.Length];
|
||||
|
||||
// Calculate total prefabs for progress tracking
|
||||
int totalPrefabs = BootPrefabs.Length;
|
||||
float progressPerPrefab = totalPrefabs > 0 ? 1f / totalPrefabs : 1f;
|
||||
float currentProgress = 0f;
|
||||
|
||||
for (var i = 0; i < BootPrefabs.Length; i++)
|
||||
{
|
||||
if (!BootPrefabs[i]) continue;
|
||||
if (!BootPrefabs[i])
|
||||
{
|
||||
// Report incremental progress even for null prefabs
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
continue;
|
||||
}
|
||||
|
||||
var instance = GameObject.InstantiateAsync(BootPrefabs[i], RuntimeContainer.transform);
|
||||
while (!instance.isDone)
|
||||
{
|
||||
// Report partial progress while waiting
|
||||
float progressInStep = instance.progress * progressPerPrefab;
|
||||
float overallProgress = i * progressPerPrefab + progressInStep;
|
||||
CustomBoot.UpdateProgress(overallProgress);
|
||||
await Task.Yield();
|
||||
}
|
||||
|
||||
Instances[i] = instance.Result[0];
|
||||
|
||||
// Report completion of this step
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,12 +77,28 @@ namespace Bootstrap
|
||||
}
|
||||
|
||||
Instances = new GameObject[BootPrefabs.Length];
|
||||
|
||||
// Calculate total prefabs for progress tracking
|
||||
int totalPrefabs = BootPrefabs.Length;
|
||||
float progressPerPrefab = totalPrefabs > 0 ? 1f / totalPrefabs : 1f;
|
||||
float currentProgress = 0f;
|
||||
|
||||
for (var i = 0; i < BootPrefabs.Length; i++)
|
||||
{
|
||||
if (!BootPrefabs[i]) continue;
|
||||
if (!BootPrefabs[i])
|
||||
{
|
||||
// Report incremental progress even for null prefabs
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
continue;
|
||||
}
|
||||
|
||||
var instance = GameObject.Instantiate(BootPrefabs[i], RuntimeContainer.transform);
|
||||
Instances[i] = instance;
|
||||
|
||||
// Report completion of this step
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ namespace UI
|
||||
private void Awake()
|
||||
{
|
||||
_instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
|
||||
if (loadingScreenContainer == null)
|
||||
loadingScreenContainer = gameObject;
|
||||
|
||||
@@ -81,9 +81,11 @@ namespace UI
|
||||
return;
|
||||
|
||||
bool isMainMenu = levelName.ToLower().Contains("mainmenu");
|
||||
gameObject.SetActive(!isMainMenu);
|
||||
bool isStartingLevel = levelName.ToLower().Contains("startingscene");
|
||||
|
||||
if(!isMainMenu)
|
||||
gameObject.SetActive(!(isMainMenu || isStartingLevel));
|
||||
|
||||
if(!isMainMenu && !isStartingLevel)
|
||||
HidePauseMenu(false); // Ensure menu is hidden when switching to a game level
|
||||
|
||||
Logging.Debug($"[PauseMenu] Setting pause menu active: {!isMainMenu} for scene: {levelName}");
|
||||
|
||||
Reference in New Issue
Block a user