diff --git a/Assets/Resources/Level/Scenes/Init.unity b/Assets/Resources/Level/Scenes/Init.unity new file mode 100644 index 0000000..957b6ea --- /dev/null +++ b/Assets/Resources/Level/Scenes/Init.unity @@ -0,0 +1,169 @@ +%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: 9 + 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: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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_IndirectSpecularColor: {r: 0.37311926, g: 0.38073996, b: 0.35872698, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + 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_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + 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: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + 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 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &6825361 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6825363} + - component: {fileID: 6825362} + m_Layer: 0 + m_Name: LifecycleManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &6825362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6825361} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 72ebc7c4151e7164aa7a3ad548419287, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &6825363 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6825361} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Resources/Level/Scenes/Init.unity.meta b/Assets/Resources/Level/Scenes/Init.unity.meta new file mode 100644 index 0000000..79937ec --- /dev/null +++ b/Assets/Resources/Level/Scenes/Init.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 151d1e6c585e2f4428ca36ef8b388343 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Src/Lifecycle.meta b/Assets/Src/Lifecycle.meta new file mode 100644 index 0000000..6bd74d0 --- /dev/null +++ b/Assets/Src/Lifecycle.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 38930798b57e751449dadfe29a07ca73 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Src/Lifecycle/LifecycleManager.cs b/Assets/Src/Lifecycle/LifecycleManager.cs new file mode 100644 index 0000000..44676d0 --- /dev/null +++ b/Assets/Src/Lifecycle/LifecycleManager.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using UnityEngine.SceneManagement; + +public class LifecycleManager : MonoBehaviour +{ + private static LifecycleManager lifecycle = null; + + public static LifecycleManager Lifecycle + { + get + { + if (lifecycle == null) + { + GameObject gObj = new GameObject(); + gObj.name = "Lifecycle"; + lifecycle = gObj.AddComponent(); + DontDestroyOnLoad(gObj); + } + return lifecycle; + } + } + + private void Awake() + { + if (lifecycle == null) + { + lifecycle = this; + DontDestroyOnLoad(gameObject); + } + else + { + Destroy(gameObject); + } + + LoadFirstScene(); + } + + private void LoadFirstScene() + { + SceneManager.LoadScene(1); + } + + /* TODOD: Um.... Application lifecycle managament (event bus etc) goes here! */ +} \ No newline at end of file diff --git a/Assets/Src/Lifecycle/LifecycleManager.cs.meta b/Assets/Src/Lifecycle/LifecycleManager.cs.meta new file mode 100644 index 0000000..b41d119 --- /dev/null +++ b/Assets/Src/Lifecycle/LifecycleManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 72ebc7c4151e7164aa7a3ad548419287 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 92e0736..29c7d77 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -4,6 +4,15 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 - m_Scenes: [] + m_Scenes: + - enabled: 1 + path: Assets/Resources/Level/Scenes/Init.unity + guid: 151d1e6c585e2f4428ca36ef8b388343 + - enabled: 1 + path: Assets/Resources/Level/Scenes/MainMenuScene.unity + guid: 1dadc1bed1ed34682aeca0557e36d299 + - enabled: 1 + path: Assets/Resources/Level/Scenes/Blaha.unity + guid: a603be4bf969b4a628cb98e7c1e57135 m_configObjects: com.unity.input.settings: {fileID: 11400000, guid: 44a21a5964a4744308070e51b89f12b0, type: 2}