├── .gitattributes ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── ProjectSettings ├── ProjectVersion.txt ├── Packages │ └── com.unity.testtools.codecoverage │ │ └── Settings.json ├── ClusterInputManager.asset ├── PresetManager.asset ├── EditorBuildSettings.asset ├── XRSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── PackageManagerSettings.asset ├── EditorSettings.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── QualitySettings.asset └── ProjectSettings.asset ├── Assets ├── Scripts │ ├── Editor │ │ ├── PlatformWindow.cs │ │ ├── Common.cs.meta │ │ ├── CoinWindow.cs.meta │ │ ├── JumpPadWindow.cs.meta │ │ ├── LevelWindow.cs.meta │ │ ├── MainWindow.cs.meta │ │ ├── PlatformWindow.cs.meta │ │ ├── FinishLineWindow.cs.meta │ │ ├── LevelWindow.cs │ │ ├── JumpPadWindow.cs │ │ ├── CoinWindow.cs │ │ ├── FinishLineWindow.cs │ │ ├── Common.cs │ │ └── MainWindow.cs │ └── Editor.meta ├── Scenes.meta ├── Scenes │ ├── SampleScene.unity.meta │ └── SampleScene.unity └── Scripts.meta ├── README.md ├── .gitignore └── Packages ├── manifest.json └── packages-lock.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "visualstudiotoolsforunity.vstuc" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.47f1 2 | m_EditorVersionWithRevision: 2022.3.47f1 (88c277b85d21) 3 | -------------------------------------------------------------------------------- /ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Dictionary": { 3 | "m_DictionaryValues": [] 4 | } 5 | } -------------------------------------------------------------------------------- /Assets/Scripts/Editor/PlatformWindow.cs: -------------------------------------------------------------------------------- 1 | namespace EditorPlatformer.Editor 2 | { 3 | public class PlatformWindow : LevelWindow 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba9424daa3c9662499207ff52b218948 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffa351e6e8efa98479f8099368bca4ec 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1e808c864ece564db348807a487e0c5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Attach to Unity", 6 | "type": "vstuc", 7 | "request": "attach" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/Common.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2841ad2049efacc4bb3d7238a1790219 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/CoinWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f713b48fb46d04b489c0a097194e28f8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/JumpPadWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee8abdee390171e4f9fe3c6a2a9b0c3f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/LevelWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c037adcaa3a8e834ba313769564fd256 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/MainWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d551d45e0574a274e985695781924a0b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/PlatformWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9f00cfcec5d7f74fab5461d348d09f2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/FinishLineWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3eb7cc26bfbca74299f402e8640ff59 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Multi Window Platformer Game In Unity Editor 2 | 3 | Multi Window Platformer in Unity Editor is a creative and technical sandbox experiment that runs entirely within the Unity Editor. Built exclusively using editor tools, the game lets players move between multiple editor windows, while resizing and repositioning them to dynamically alter the level itself. 4 | 5 | ## Preview 6 | 7 | Video Link: https://www.youtube.com/watch?v=FOoy6ZyVJE8 8 | 9 | ![Multi-Window-Platformer-Game-Unity-Editor-3](https://github.com/user-attachments/assets/a9a509fe-b900-4932-b28f-4b3f90981dec) 10 | ![Multi-Window-Platformer-Game-Unity-Editor-2](https://github.com/user-attachments/assets/7292a72a-c52f-4d66-8319-f8d68cb2f760) 11 | ![Multi-Window-Platformer-Game-Unity-Editor-1](https://github.com/user-attachments/assets/c00fc50c-0fb2-41a4-ac0d-4a9fe0203af1) 12 | 13 | 14 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -830 34 | m_OriginalInstanceId: -832 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/LevelWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace EditorPlatformer.Editor 5 | { 6 | public interface ILevelWindow 7 | { 8 | Rect position { get; } 9 | void Tick(PlayerArgs args); 10 | void Close(); 11 | } 12 | 13 | public abstract class LevelWindow : EditorWindow, ILevelWindow 14 | { 15 | [SerializeField] private PlayerArgs m_playerArgs; 16 | 17 | [SerializeField] protected Rect m_playerRectInWindow; 18 | 19 | public virtual void Tick(PlayerArgs args) 20 | { 21 | m_playerArgs = args; 22 | 23 | var playerCenter = m_playerArgs.center; 24 | var playerSize = m_playerArgs.size; 25 | var playerRect = new Rect(playerCenter.x - playerSize.x / 2, playerCenter.y - playerSize.y / 2, playerSize.x, playerSize.y); 26 | 27 | var windowPosition = position.position; 28 | 29 | m_playerRectInWindow = new Rect(playerRect.position.x - windowPosition.x, playerRect.position.y - windowPosition.y, playerRect.width, playerRect.height); 30 | } 31 | 32 | protected virtual void OnGUI() 33 | { 34 | EditorGUI.DrawRect(m_playerRectInWindow, Info.PlayerColor); 35 | 36 | Repaint(); 37 | } 38 | 39 | protected virtual void OnDestroy() 40 | { 41 | MainWindow.RemoveWindow(this); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Assets/Scripts/Editor/JumpPadWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace EditorPlatformer.Editor 6 | { 7 | public class JumpPadWindow : LevelWindow 8 | { 9 | [SerializeField] 10 | private bool m_isPlayerOnJumpPad; 11 | 12 | public bool isPlayerOnJumpPad => m_isPlayerOnJumpPad; 13 | 14 | [SerializeField] 15 | private Rect m_jumpPadCollisionRect; 16 | [SerializeField] 17 | private Rect m_jumpPadViewRect; 18 | 19 | public override void Tick(PlayerArgs args) 20 | { 21 | base.Tick(args); 22 | 23 | var windowRect = this.position; 24 | var centerY = windowRect.height - Info.JUMP_PAD_COLLISION_BOUNDS_HEIGHT; 25 | var jumpPadRect = new Rect(0f, centerY, windowRect.width, Info.JUMP_PAD_COLLISION_BOUNDS_HEIGHT); 26 | m_jumpPadCollisionRect = jumpPadRect; 27 | 28 | m_isPlayerOnJumpPad = m_jumpPadCollisionRect.Overlaps(m_playerRectInWindow); 29 | 30 | var jumpPadPosYOffset = Info.JUMP_PAD_COLLISION_BOUNDS_HEIGHT * (Mathf.Sin(args.time * 0.3f) + 1f) * 0.5f; 31 | m_jumpPadViewRect = new Rect(jumpPadRect.position.x, jumpPadRect.position.y + jumpPadPosYOffset, jumpPadRect.size.x, jumpPadRect.size.y + jumpPadPosYOffset); 32 | } 33 | 34 | protected override void OnGUI() 35 | { 36 | base.OnGUI(); 37 | 38 | EditorGUI.DrawRect(m_jumpPadViewRect, Info.JumpPadColor); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* 73 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.DS_Store": true, 4 | "**/.git": true, 5 | "**/.gitmodules": true, 6 | "**/*.booproj": true, 7 | "**/*.pidb": true, 8 | "**/*.suo": true, 9 | "**/*.user": true, 10 | "**/*.userprefs": true, 11 | "**/*.unityproj": true, 12 | "**/*.dll": true, 13 | "**/*.exe": true, 14 | "**/*.pdf": true, 15 | "**/*.mid": true, 16 | "**/*.midi": true, 17 | "**/*.wav": true, 18 | "**/*.gif": true, 19 | "**/*.ico": true, 20 | "**/*.jpg": true, 21 | "**/*.jpeg": true, 22 | "**/*.png": true, 23 | "**/*.psd": true, 24 | "**/*.tga": true, 25 | "**/*.tif": true, 26 | "**/*.tiff": true, 27 | "**/*.3ds": true, 28 | "**/*.3DS": true, 29 | "**/*.fbx": true, 30 | "**/*.FBX": true, 31 | "**/*.lxo": true, 32 | "**/*.LXO": true, 33 | "**/*.ma": true, 34 | "**/*.MA": true, 35 | "**/*.obj": true, 36 | "**/*.OBJ": true, 37 | "**/*.asset": true, 38 | "**/*.cubemap": true, 39 | "**/*.flare": true, 40 | "**/*.mat": true, 41 | "**/*.meta": true, 42 | "**/*.prefab": true, 43 | "**/*.unity": true, 44 | "build/": true, 45 | "Build/": true, 46 | "Library/": true, 47 | "library/": true, 48 | "obj/": true, 49 | "Obj/": true, 50 | "ProjectSettings/": true, 51 | "temp/": true, 52 | "Temp/": true 53 | }, 54 | "dotnet.defaultSolution": "Multi-Window-Game-Unity-Editor.sln" 55 | } -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/CoinWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace EditorPlatformer.Editor 5 | { 6 | public class CoinWindow : LevelWindow 7 | { 8 | [SerializeField] 9 | private bool m_isCollected; 10 | 11 | [SerializeField] 12 | private Rect m_coinCollisionRect; 13 | [SerializeField] 14 | private Rect m_coinViewRect; 15 | 16 | public bool isCollected => m_isCollected; 17 | 18 | public override void Tick(PlayerArgs args) 19 | { 20 | base.Tick(args); 21 | 22 | var windowRect = this.position; 23 | var centerX = windowRect.width * 0.5f; 24 | var centerY = windowRect.height - Info.COIN_COLLISION_BOUNDS_SIZE; 25 | var coinRect = new Rect(centerX - Info.COIN_COLLISION_BOUNDS_SIZE * 0.5f, centerY - Info.COIN_COLLISION_BOUNDS_SIZE * 0.5f, Info.COIN_COLLISION_BOUNDS_SIZE, Info.COIN_COLLISION_BOUNDS_SIZE); 26 | m_coinCollisionRect = coinRect; 27 | 28 | if (m_coinCollisionRect.Overlaps(m_playerRectInWindow)) 29 | { 30 | m_isCollected = true; 31 | } 32 | 33 | var coinRectSizeX = (Info.COIN_COLLISION_BOUNDS_SIZE * 0.1f) + (coinRect.size.x * (Mathf.Sin(args.time * 0.05f) + 1f) * 0.5f); 34 | m_coinViewRect = new Rect(coinRect.position.x + Info.COIN_COLLISION_BOUNDS_SIZE * 0.5f - coinRectSizeX * 0.5f, coinRect.position.y, coinRectSizeX, coinRect.size.y); 35 | } 36 | 37 | protected override void OnGUI() 38 | { 39 | base.OnGUI(); 40 | 41 | if (!m_isCollected) 42 | { 43 | EditorGUI.DrawRect(m_coinViewRect, Info.CoinColor); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "2.5.2", 4 | "com.unity.feature.development": "1.0.1", 5 | "com.unity.textmeshpro": "3.0.7", 6 | "com.unity.timeline": "1.7.6", 7 | "com.unity.ugui": "1.0.0", 8 | "com.unity.visualscripting": "1.9.4", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.androidjni": "1.0.0", 11 | "com.unity.modules.animation": "1.0.0", 12 | "com.unity.modules.assetbundle": "1.0.0", 13 | "com.unity.modules.audio": "1.0.0", 14 | "com.unity.modules.cloth": "1.0.0", 15 | "com.unity.modules.director": "1.0.0", 16 | "com.unity.modules.imageconversion": "1.0.0", 17 | "com.unity.modules.imgui": "1.0.0", 18 | "com.unity.modules.jsonserialize": "1.0.0", 19 | "com.unity.modules.particlesystem": "1.0.0", 20 | "com.unity.modules.physics": "1.0.0", 21 | "com.unity.modules.physics2d": "1.0.0", 22 | "com.unity.modules.screencapture": "1.0.0", 23 | "com.unity.modules.terrain": "1.0.0", 24 | "com.unity.modules.terrainphysics": "1.0.0", 25 | "com.unity.modules.tilemap": "1.0.0", 26 | "com.unity.modules.ui": "1.0.0", 27 | "com.unity.modules.uielements": "1.0.0", 28 | "com.unity.modules.umbra": "1.0.0", 29 | "com.unity.modules.unityanalytics": "1.0.0", 30 | "com.unity.modules.unitywebrequest": "1.0.0", 31 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 32 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 33 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 34 | "com.unity.modules.unitywebrequestwww": "1.0.0", 35 | "com.unity.modules.vehicles": "1.0.0", 36 | "com.unity.modules.video": "1.0.0", 37 | "com.unity.modules.vr": "1.0.0", 38 | "com.unity.modules.wind": "1.0.0", 39 | "com.unity.modules.xr": "1.0.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/FinishLineWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace EditorPlatformer.Editor 6 | { 7 | public class FinishLineWindow : LevelWindow 8 | { 9 | [SerializeField] 10 | private bool m_isInFinishLine; 11 | 12 | [SerializeField] 13 | private Rect m_finishLineCollisionRect; 14 | 15 | public bool isInFinishLine => m_isInFinishLine; 16 | 17 | public override void Tick(PlayerArgs args) 18 | { 19 | base.Tick(args); 20 | 21 | var windowRect = this.position; 22 | var centerX = windowRect.width * 0.5f; 23 | var centerY = windowRect.height - Info.FINISH_LINE_COLLISION_BOUNDS_SIZE; 24 | var finishLineRect = new Rect(centerX - Info.FINISH_LINE_COLLISION_BOUNDS_SIZE * 0.5f, centerY - Info.FINISH_LINE_COLLISION_BOUNDS_SIZE * 0.5f, Info.FINISH_LINE_COLLISION_BOUNDS_SIZE, Info.FINISH_LINE_COLLISION_BOUNDS_SIZE); 25 | m_finishLineCollisionRect = finishLineRect; 26 | 27 | if (m_finishLineCollisionRect.Overlaps(m_playerRectInWindow)) 28 | { 29 | m_isInFinishLine = true; 30 | } 31 | } 32 | 33 | protected override void OnGUI() 34 | { 35 | base.OnGUI(); 36 | 37 | if (isInFinishLine) 38 | { 39 | GUILayout.Label("You Win!"); 40 | return; 41 | } 42 | 43 | var sizeX = m_finishLineCollisionRect.size.x / Info.FINISH_LINE_VIEW_CHECK_COUNT; 44 | var sizeY = m_finishLineCollisionRect.size.y / Info.FINISH_LINE_VIEW_CHECK_COUNT; 45 | var isColorBlack = true; 46 | for (var i = 0; i < Info.FINISH_LINE_VIEW_CHECK_COUNT; i++) 47 | { 48 | isColorBlack = !isColorBlack; 49 | for (var j = 0; j < Info.FINISH_LINE_VIEW_CHECK_COUNT; j++) 50 | { 51 | var posX = m_finishLineCollisionRect.position.x + sizeX * i; 52 | var posY = m_finishLineCollisionRect.position.y + sizeY * j; 53 | var rect = new Rect(posX, posY, sizeX, sizeY); 54 | var color = isColorBlack ? Color.black : Color.white; 55 | isColorBlack = !isColorBlack; 56 | EditorGUI.DrawRect(rect, color); 57 | } 58 | } 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/Common.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace EditorPlatformer.Editor 5 | { 6 | public readonly struct Info 7 | { 8 | public const long TICK_RATE_MILLISECONDS = 10; 9 | 10 | public const float SIMULATION_SPEED = 1f; 11 | public const float PLAYER_SPEED = 1f * SIMULATION_SPEED; 12 | public const float PLAYER_JUMP_FORCE = 12f * SIMULATION_SPEED; 13 | public const float GRAVITY = 0.3f * SIMULATION_SPEED; 14 | public const float FRICTION = 0.95f; 15 | public const float COLLISION_SPEED_MULTIPLIER = 0.8f; 16 | public const float STEP_UP_X_THRESHOLD = 3f; 17 | public const float STEP_UP_Y_THRESHOLD = 4f; 18 | public const float JUMP_PAD_FORCE = 20f * SIMULATION_SPEED; 19 | 20 | public const float COIN_COLLISION_BOUNDS_SIZE = 20f; 21 | public const float JUMP_PAD_COLLISION_BOUNDS_HEIGHT = 30f; 22 | public const float FINISH_LINE_COLLISION_BOUNDS_SIZE = 50f; 23 | public const int FINISH_LINE_VIEW_CHECK_COUNT = 4; 24 | 25 | public static Vector2 InitPlayerPosition = new Vector2(350f, 350f ); 26 | public static readonly Vector2 PlayerSize = new Vector2(50f, 50f); 27 | public static readonly Color PlayerColor = new Color(1f, 0f, 0f, 0.5f); 28 | public static readonly Color CoinColor = new Color(0.81f, 0.73f, 0f, 0.85f); 29 | public static readonly Color JumpPadColor = new Color(0f, 0.81f, 0.81f, 0.85f); 30 | 31 | public readonly struct WindowNames 32 | { 33 | public const string EDITOR_PLATFORMER = "Editor Platformer"; 34 | public const string PLATFORM = "Platform"; 35 | public const string COIN = "Coin"; 36 | public const string FINISH_LINE = "Finish Line"; 37 | public const string JUMP_PAD = "Jump Pad"; 38 | } 39 | } 40 | 41 | [Serializable] 42 | public struct PlayerArgs 43 | { 44 | public float time; 45 | public Vector2 center; 46 | public Vector2 size; 47 | } 48 | 49 | public struct BoundsCollisionData 50 | { 51 | public int topLeftCollisionRectIndex; 52 | public int topRightCollisionRectIndex; 53 | public int bottomLeftCollisionRectIndex; 54 | public int bottomRightCollisionRectIndex; 55 | 56 | public static readonly BoundsCollisionData Empty = new BoundsCollisionData 57 | { 58 | topLeftCollisionRectIndex = -1, 59 | topRightCollisionRectIndex = -1, 60 | bottomLeftCollisionRectIndex = -1, 61 | bottomRightCollisionRectIndex = -1 62 | }; 63 | 64 | public bool AllPointsAreOutsideAllRects() 65 | { 66 | return topLeftCollisionRectIndex == -1 && topRightCollisionRectIndex == -1 && bottomLeftCollisionRectIndex == -1 && bottomRightCollisionRectIndex == -1; 67 | } 68 | 69 | public bool AtLeastOnePointIsInsideAnyRect() 70 | { 71 | return topLeftCollisionRectIndex != -1 || topRightCollisionRectIndex != -1 || bottomLeftCollisionRectIndex != -1 || bottomRightCollisionRectIndex != -1; 72 | } 73 | 74 | public bool AllPointsAreInsideAnyRect() 75 | { 76 | return topLeftCollisionRectIndex != -1 && topRightCollisionRectIndex != -1 && bottomLeftCollisionRectIndex != -1 && bottomRightCollisionRectIndex != -1; 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | GameCoreScarlett: 5 223 | GameCoreXboxOne: 5 224 | Nintendo 3DS: 5 225 | Nintendo Switch: 5 226 | PS4: 5 227 | PS5: 5 228 | Stadia: 5 229 | Standalone: 5 230 | WebGL: 3 231 | Windows Store Apps: 5 232 | XboxOne: 5 233 | iPhone: 2 234 | tvOS: 2 235 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 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: 9 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: 705507994} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &705507993 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInternal: {fileID: 0} 129 | serializedVersion: 6 130 | m_Component: 131 | - component: {fileID: 705507995} 132 | - component: {fileID: 705507994} 133 | m_Layer: 0 134 | m_Name: Directional Light 135 | m_TagString: Untagged 136 | m_Icon: {fileID: 0} 137 | m_NavMeshLayer: 0 138 | m_StaticEditorFlags: 0 139 | m_IsActive: 1 140 | --- !u!108 &705507994 141 | Light: 142 | m_ObjectHideFlags: 0 143 | m_CorrespondingSourceObject: {fileID: 0} 144 | m_PrefabInternal: {fileID: 0} 145 | m_GameObject: {fileID: 705507993} 146 | m_Enabled: 1 147 | serializedVersion: 8 148 | m_Type: 1 149 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 150 | m_Intensity: 1 151 | m_Range: 10 152 | m_SpotAngle: 30 153 | m_CookieSize: 10 154 | m_Shadows: 155 | m_Type: 2 156 | m_Resolution: -1 157 | m_CustomResolution: -1 158 | m_Strength: 1 159 | m_Bias: 0.05 160 | m_NormalBias: 0.4 161 | m_NearPlane: 0.2 162 | m_Cookie: {fileID: 0} 163 | m_DrawHalo: 0 164 | m_Flare: {fileID: 0} 165 | m_RenderMode: 0 166 | m_CullingMask: 167 | serializedVersion: 2 168 | m_Bits: 4294967295 169 | m_Lightmapping: 1 170 | m_LightShadowCasterMode: 0 171 | m_AreaSize: {x: 1, y: 1} 172 | m_BounceIntensity: 1 173 | m_ColorTemperature: 6570 174 | m_UseColorTemperature: 0 175 | m_ShadowRadius: 0 176 | m_ShadowAngle: 0 177 | --- !u!4 &705507995 178 | Transform: 179 | m_ObjectHideFlags: 0 180 | m_CorrespondingSourceObject: {fileID: 0} 181 | m_PrefabInternal: {fileID: 0} 182 | m_GameObject: {fileID: 705507993} 183 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 184 | m_LocalPosition: {x: 0, y: 3, z: 0} 185 | m_LocalScale: {x: 1, y: 1, z: 1} 186 | m_Children: [] 187 | m_Father: {fileID: 0} 188 | m_RootOrder: 1 189 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 190 | --- !u!1 &963194225 191 | GameObject: 192 | m_ObjectHideFlags: 0 193 | m_CorrespondingSourceObject: {fileID: 0} 194 | m_PrefabInternal: {fileID: 0} 195 | serializedVersion: 6 196 | m_Component: 197 | - component: {fileID: 963194228} 198 | - component: {fileID: 963194227} 199 | - component: {fileID: 963194226} 200 | m_Layer: 0 201 | m_Name: Main Camera 202 | m_TagString: MainCamera 203 | m_Icon: {fileID: 0} 204 | m_NavMeshLayer: 0 205 | m_StaticEditorFlags: 0 206 | m_IsActive: 1 207 | --- !u!81 &963194226 208 | AudioListener: 209 | m_ObjectHideFlags: 0 210 | m_CorrespondingSourceObject: {fileID: 0} 211 | m_PrefabInternal: {fileID: 0} 212 | m_GameObject: {fileID: 963194225} 213 | m_Enabled: 1 214 | --- !u!20 &963194227 215 | Camera: 216 | m_ObjectHideFlags: 0 217 | m_CorrespondingSourceObject: {fileID: 0} 218 | m_PrefabInternal: {fileID: 0} 219 | m_GameObject: {fileID: 963194225} 220 | m_Enabled: 1 221 | serializedVersion: 2 222 | m_ClearFlags: 1 223 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 224 | m_projectionMatrixMode: 1 225 | m_SensorSize: {x: 36, y: 24} 226 | m_LensShift: {x: 0, y: 0} 227 | m_GateFitMode: 2 228 | m_FocalLength: 50 229 | m_NormalizedViewPortRect: 230 | serializedVersion: 2 231 | x: 0 232 | y: 0 233 | width: 1 234 | height: 1 235 | near clip plane: 0.3 236 | far clip plane: 1000 237 | field of view: 60 238 | orthographic: 0 239 | orthographic size: 5 240 | m_Depth: -1 241 | m_CullingMask: 242 | serializedVersion: 2 243 | m_Bits: 4294967295 244 | m_RenderingPath: -1 245 | m_TargetTexture: {fileID: 0} 246 | m_TargetDisplay: 0 247 | m_TargetEye: 3 248 | m_HDR: 1 249 | m_AllowMSAA: 1 250 | m_AllowDynamicResolution: 0 251 | m_ForceIntoRT: 0 252 | m_OcclusionCulling: 1 253 | m_StereoConvergence: 10 254 | m_StereoSeparation: 0.022 255 | --- !u!4 &963194228 256 | Transform: 257 | m_ObjectHideFlags: 0 258 | m_CorrespondingSourceObject: {fileID: 0} 259 | m_PrefabInternal: {fileID: 0} 260 | m_GameObject: {fileID: 963194225} 261 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 262 | m_LocalPosition: {x: 0, y: 1, z: -10} 263 | m_LocalScale: {x: 1, y: 1, z: 1} 264 | m_Children: [] 265 | m_Father: {fileID: 0} 266 | m_RootOrder: 0 267 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 268 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": { 4 | "version": "2.5.2", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": {}, 8 | "url": "https://packages.unity.com" 9 | }, 10 | "com.unity.editorcoroutines": { 11 | "version": "1.0.0", 12 | "depth": 1, 13 | "source": "registry", 14 | "dependencies": {}, 15 | "url": "https://packages.unity.com" 16 | }, 17 | "com.unity.ext.nunit": { 18 | "version": "1.0.6", 19 | "depth": 2, 20 | "source": "registry", 21 | "dependencies": {}, 22 | "url": "https://packages.unity.com" 23 | }, 24 | "com.unity.feature.development": { 25 | "version": "1.0.1", 26 | "depth": 0, 27 | "source": "builtin", 28 | "dependencies": { 29 | "com.unity.ide.visualstudio": "2.0.22", 30 | "com.unity.ide.rider": "3.0.31", 31 | "com.unity.ide.vscode": "1.2.5", 32 | "com.unity.editorcoroutines": "1.0.0", 33 | "com.unity.performance.profile-analyzer": "1.2.2", 34 | "com.unity.test-framework": "1.1.33", 35 | "com.unity.testtools.codecoverage": "1.2.6" 36 | } 37 | }, 38 | "com.unity.ide.rider": { 39 | "version": "3.0.31", 40 | "depth": 1, 41 | "source": "registry", 42 | "dependencies": { 43 | "com.unity.ext.nunit": "1.0.6" 44 | }, 45 | "url": "https://packages.unity.com" 46 | }, 47 | "com.unity.ide.visualstudio": { 48 | "version": "2.0.22", 49 | "depth": 1, 50 | "source": "registry", 51 | "dependencies": { 52 | "com.unity.test-framework": "1.1.9" 53 | }, 54 | "url": "https://packages.unity.com" 55 | }, 56 | "com.unity.ide.vscode": { 57 | "version": "1.2.5", 58 | "depth": 1, 59 | "source": "registry", 60 | "dependencies": {}, 61 | "url": "https://packages.unity.com" 62 | }, 63 | "com.unity.performance.profile-analyzer": { 64 | "version": "1.2.2", 65 | "depth": 1, 66 | "source": "registry", 67 | "dependencies": {}, 68 | "url": "https://packages.unity.com" 69 | }, 70 | "com.unity.settings-manager": { 71 | "version": "2.0.1", 72 | "depth": 2, 73 | "source": "registry", 74 | "dependencies": {}, 75 | "url": "https://packages.unity.com" 76 | }, 77 | "com.unity.test-framework": { 78 | "version": "1.1.33", 79 | "depth": 1, 80 | "source": "registry", 81 | "dependencies": { 82 | "com.unity.ext.nunit": "1.0.6", 83 | "com.unity.modules.imgui": "1.0.0", 84 | "com.unity.modules.jsonserialize": "1.0.0" 85 | }, 86 | "url": "https://packages.unity.com" 87 | }, 88 | "com.unity.testtools.codecoverage": { 89 | "version": "1.2.6", 90 | "depth": 1, 91 | "source": "registry", 92 | "dependencies": { 93 | "com.unity.test-framework": "1.0.16", 94 | "com.unity.settings-manager": "1.0.1" 95 | }, 96 | "url": "https://packages.unity.com" 97 | }, 98 | "com.unity.textmeshpro": { 99 | "version": "3.0.7", 100 | "depth": 0, 101 | "source": "registry", 102 | "dependencies": { 103 | "com.unity.ugui": "1.0.0" 104 | }, 105 | "url": "https://packages.unity.com" 106 | }, 107 | "com.unity.timeline": { 108 | "version": "1.7.6", 109 | "depth": 0, 110 | "source": "registry", 111 | "dependencies": { 112 | "com.unity.modules.audio": "1.0.0", 113 | "com.unity.modules.director": "1.0.0", 114 | "com.unity.modules.animation": "1.0.0", 115 | "com.unity.modules.particlesystem": "1.0.0" 116 | }, 117 | "url": "https://packages.unity.com" 118 | }, 119 | "com.unity.ugui": { 120 | "version": "1.0.0", 121 | "depth": 0, 122 | "source": "builtin", 123 | "dependencies": { 124 | "com.unity.modules.ui": "1.0.0", 125 | "com.unity.modules.imgui": "1.0.0" 126 | } 127 | }, 128 | "com.unity.visualscripting": { 129 | "version": "1.9.4", 130 | "depth": 0, 131 | "source": "registry", 132 | "dependencies": { 133 | "com.unity.ugui": "1.0.0", 134 | "com.unity.modules.jsonserialize": "1.0.0" 135 | }, 136 | "url": "https://packages.unity.com" 137 | }, 138 | "com.unity.modules.ai": { 139 | "version": "1.0.0", 140 | "depth": 0, 141 | "source": "builtin", 142 | "dependencies": {} 143 | }, 144 | "com.unity.modules.androidjni": { 145 | "version": "1.0.0", 146 | "depth": 0, 147 | "source": "builtin", 148 | "dependencies": {} 149 | }, 150 | "com.unity.modules.animation": { 151 | "version": "1.0.0", 152 | "depth": 0, 153 | "source": "builtin", 154 | "dependencies": {} 155 | }, 156 | "com.unity.modules.assetbundle": { 157 | "version": "1.0.0", 158 | "depth": 0, 159 | "source": "builtin", 160 | "dependencies": {} 161 | }, 162 | "com.unity.modules.audio": { 163 | "version": "1.0.0", 164 | "depth": 0, 165 | "source": "builtin", 166 | "dependencies": {} 167 | }, 168 | "com.unity.modules.cloth": { 169 | "version": "1.0.0", 170 | "depth": 0, 171 | "source": "builtin", 172 | "dependencies": { 173 | "com.unity.modules.physics": "1.0.0" 174 | } 175 | }, 176 | "com.unity.modules.director": { 177 | "version": "1.0.0", 178 | "depth": 0, 179 | "source": "builtin", 180 | "dependencies": { 181 | "com.unity.modules.audio": "1.0.0", 182 | "com.unity.modules.animation": "1.0.0" 183 | } 184 | }, 185 | "com.unity.modules.imageconversion": { 186 | "version": "1.0.0", 187 | "depth": 0, 188 | "source": "builtin", 189 | "dependencies": {} 190 | }, 191 | "com.unity.modules.imgui": { 192 | "version": "1.0.0", 193 | "depth": 0, 194 | "source": "builtin", 195 | "dependencies": {} 196 | }, 197 | "com.unity.modules.jsonserialize": { 198 | "version": "1.0.0", 199 | "depth": 0, 200 | "source": "builtin", 201 | "dependencies": {} 202 | }, 203 | "com.unity.modules.particlesystem": { 204 | "version": "1.0.0", 205 | "depth": 0, 206 | "source": "builtin", 207 | "dependencies": {} 208 | }, 209 | "com.unity.modules.physics": { 210 | "version": "1.0.0", 211 | "depth": 0, 212 | "source": "builtin", 213 | "dependencies": {} 214 | }, 215 | "com.unity.modules.physics2d": { 216 | "version": "1.0.0", 217 | "depth": 0, 218 | "source": "builtin", 219 | "dependencies": {} 220 | }, 221 | "com.unity.modules.screencapture": { 222 | "version": "1.0.0", 223 | "depth": 0, 224 | "source": "builtin", 225 | "dependencies": { 226 | "com.unity.modules.imageconversion": "1.0.0" 227 | } 228 | }, 229 | "com.unity.modules.subsystems": { 230 | "version": "1.0.0", 231 | "depth": 1, 232 | "source": "builtin", 233 | "dependencies": { 234 | "com.unity.modules.jsonserialize": "1.0.0" 235 | } 236 | }, 237 | "com.unity.modules.terrain": { 238 | "version": "1.0.0", 239 | "depth": 0, 240 | "source": "builtin", 241 | "dependencies": {} 242 | }, 243 | "com.unity.modules.terrainphysics": { 244 | "version": "1.0.0", 245 | "depth": 0, 246 | "source": "builtin", 247 | "dependencies": { 248 | "com.unity.modules.physics": "1.0.0", 249 | "com.unity.modules.terrain": "1.0.0" 250 | } 251 | }, 252 | "com.unity.modules.tilemap": { 253 | "version": "1.0.0", 254 | "depth": 0, 255 | "source": "builtin", 256 | "dependencies": { 257 | "com.unity.modules.physics2d": "1.0.0" 258 | } 259 | }, 260 | "com.unity.modules.ui": { 261 | "version": "1.0.0", 262 | "depth": 0, 263 | "source": "builtin", 264 | "dependencies": {} 265 | }, 266 | "com.unity.modules.uielements": { 267 | "version": "1.0.0", 268 | "depth": 0, 269 | "source": "builtin", 270 | "dependencies": { 271 | "com.unity.modules.ui": "1.0.0", 272 | "com.unity.modules.imgui": "1.0.0", 273 | "com.unity.modules.jsonserialize": "1.0.0" 274 | } 275 | }, 276 | "com.unity.modules.umbra": { 277 | "version": "1.0.0", 278 | "depth": 0, 279 | "source": "builtin", 280 | "dependencies": {} 281 | }, 282 | "com.unity.modules.unityanalytics": { 283 | "version": "1.0.0", 284 | "depth": 0, 285 | "source": "builtin", 286 | "dependencies": { 287 | "com.unity.modules.unitywebrequest": "1.0.0", 288 | "com.unity.modules.jsonserialize": "1.0.0" 289 | } 290 | }, 291 | "com.unity.modules.unitywebrequest": { 292 | "version": "1.0.0", 293 | "depth": 0, 294 | "source": "builtin", 295 | "dependencies": {} 296 | }, 297 | "com.unity.modules.unitywebrequestassetbundle": { 298 | "version": "1.0.0", 299 | "depth": 0, 300 | "source": "builtin", 301 | "dependencies": { 302 | "com.unity.modules.assetbundle": "1.0.0", 303 | "com.unity.modules.unitywebrequest": "1.0.0" 304 | } 305 | }, 306 | "com.unity.modules.unitywebrequestaudio": { 307 | "version": "1.0.0", 308 | "depth": 0, 309 | "source": "builtin", 310 | "dependencies": { 311 | "com.unity.modules.unitywebrequest": "1.0.0", 312 | "com.unity.modules.audio": "1.0.0" 313 | } 314 | }, 315 | "com.unity.modules.unitywebrequesttexture": { 316 | "version": "1.0.0", 317 | "depth": 0, 318 | "source": "builtin", 319 | "dependencies": { 320 | "com.unity.modules.unitywebrequest": "1.0.0", 321 | "com.unity.modules.imageconversion": "1.0.0" 322 | } 323 | }, 324 | "com.unity.modules.unitywebrequestwww": { 325 | "version": "1.0.0", 326 | "depth": 0, 327 | "source": "builtin", 328 | "dependencies": { 329 | "com.unity.modules.unitywebrequest": "1.0.0", 330 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 331 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 332 | "com.unity.modules.audio": "1.0.0", 333 | "com.unity.modules.assetbundle": "1.0.0", 334 | "com.unity.modules.imageconversion": "1.0.0" 335 | } 336 | }, 337 | "com.unity.modules.vehicles": { 338 | "version": "1.0.0", 339 | "depth": 0, 340 | "source": "builtin", 341 | "dependencies": { 342 | "com.unity.modules.physics": "1.0.0" 343 | } 344 | }, 345 | "com.unity.modules.video": { 346 | "version": "1.0.0", 347 | "depth": 0, 348 | "source": "builtin", 349 | "dependencies": { 350 | "com.unity.modules.audio": "1.0.0", 351 | "com.unity.modules.ui": "1.0.0", 352 | "com.unity.modules.unitywebrequest": "1.0.0" 353 | } 354 | }, 355 | "com.unity.modules.vr": { 356 | "version": "1.0.0", 357 | "depth": 0, 358 | "source": "builtin", 359 | "dependencies": { 360 | "com.unity.modules.jsonserialize": "1.0.0", 361 | "com.unity.modules.physics": "1.0.0", 362 | "com.unity.modules.xr": "1.0.0" 363 | } 364 | }, 365 | "com.unity.modules.wind": { 366 | "version": "1.0.0", 367 | "depth": 0, 368 | "source": "builtin", 369 | "dependencies": {} 370 | }, 371 | "com.unity.modules.xr": { 372 | "version": "1.0.0", 373 | "depth": 0, 374 | "source": "builtin", 375 | "dependencies": { 376 | "com.unity.modules.physics": "1.0.0", 377 | "com.unity.modules.jsonserialize": "1.0.0", 378 | "com.unity.modules.subsystems": "1.0.0" 379 | } 380 | } 381 | } 382 | } 383 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/MainWindow.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Diagnostics; 3 | using UnityEditor; 4 | using UnityEngine; 5 | using Debug = UnityEngine.Debug; 6 | 7 | namespace EditorPlatformer.Editor 8 | { 9 | [DefaultExecutionOrder(-1)] 10 | public class MainWindow : EditorWindow 11 | { 12 | [MenuItem("Editor Platformer/Play", false, 100)] 13 | public static void Play() 14 | { 15 | if (HasOpenInstances()) 16 | GetWindow().CloseAll(); 17 | 18 | while (HasOpenInstances()) 19 | GetWindow().Close(); 20 | 21 | var editorApplicationRect = EditorGUIUtility.GetMainWindowPosition(); 22 | var firstPlatformWindowSize = Info.PlayerSize * 3f; 23 | Info.InitPlayerPosition = new Vector2(firstPlatformWindowSize.x * 0.5f, editorApplicationRect.height - firstPlatformWindowSize.y * 0.5f); 24 | 25 | var mainWindow = GetWindow(Info.WindowNames.EDITOR_PLATFORMER); 26 | var mainWindowSize = new Vector2(350f, 160f); 27 | mainWindow.minSize = mainWindowSize; 28 | mainWindow.maxSize = mainWindowSize; 29 | mainWindow.position = new Rect(new Vector2(0, 50f), mainWindowSize); 30 | 31 | var firstPlatformWindow = SpawnWindow(Info.WindowNames.PLATFORM); 32 | firstPlatformWindow.position = new Rect(new Vector2(0f, editorApplicationRect.height - firstPlatformWindowSize.y), firstPlatformWindowSize); 33 | 34 | var finishLineWindow = SpawnWindow(Info.WindowNames.FINISH_LINE); 35 | mainWindow.Add(finishLineWindow); 36 | var finishLineWindowSize = Info.FINISH_LINE_COLLISION_BOUNDS_SIZE * 2f; 37 | finishLineWindow.minSize = new Vector2(finishLineWindowSize, finishLineWindowSize); 38 | finishLineWindow.maxSize = new Vector2(finishLineWindowSize, finishLineWindowSize); 39 | finishLineWindow.position = new Rect(editorApplicationRect.width - finishLineWindowSize, 0f, finishLineWindowSize, finishLineWindowSize); 40 | } 41 | 42 | [MenuItem("Editor Platformer/Spawn Platform Window %q")] 43 | public static void SpawnPlatformWindow() 44 | { 45 | SpawnWindow(Info.WindowNames.PLATFORM); 46 | } 47 | 48 | [MenuItem("Editor Platformer/Spawn Coin Window %w")] 49 | public static void SpawnCoinWindow() 50 | { 51 | var coinWindow = SpawnWindow(Info.WindowNames.COIN); 52 | var mainWindow = GetWindow(); 53 | mainWindow.Add(coinWindow); 54 | } 55 | 56 | [MenuItem("Editor Platformer/Spawn JumpPad Window %e")] 57 | public static void SpawnJumpPadWindow() 58 | { 59 | var jumpPadWindow = SpawnWindow(Info.WindowNames.JUMP_PAD); 60 | var mainWindow = GetWindow(); 61 | mainWindow.Add(jumpPadWindow); 62 | } 63 | 64 | private static T SpawnWindow(string windowNamePrefix) where T : LevelWindow, ILevelWindow 65 | { 66 | var mainWindow = GetWindow(); 67 | 68 | var levelWindowName = windowNamePrefix; 69 | var levelWindow = CreateWindow(levelWindowName); 70 | levelWindow.minSize = Info.PlayerSize; 71 | levelWindow.position = new Rect(300f, 300f, 200f, 200f); 72 | 73 | mainWindow.Add(levelWindow); 74 | 75 | return levelWindow; 76 | } 77 | 78 | public static void RemoveWindow(ILevelWindow window) 79 | { 80 | if (HasOpenInstances()) 81 | { 82 | var mainWindow = GetWindow(); 83 | mainWindow.Remove(window); 84 | } 85 | } 86 | 87 | [SerializeField] 88 | private List m_windows = new List(16); 89 | [SerializeField] 90 | private List m_coinWindows = new List(16); 91 | [SerializeField] 92 | private List m_jumpPadWindows = new List(16); 93 | [SerializeField] 94 | private FinishLineWindow m_finishLineWindow; 95 | [SerializeField] 96 | private List m_rects = new List(16); 97 | [SerializeField] 98 | private Vector2 m_playerPosition = Info.InitPlayerPosition; 99 | [SerializeField] 100 | private Vector2 m_previousPlayerPosition = Info.InitPlayerPosition; 101 | 102 | private Stopwatch m_stopwatch; 103 | [SerializeField] 104 | private int m_ticks; 105 | [SerializeField] 106 | private KeyCode m_lastPressedKey; 107 | [SerializeField] 108 | private bool m_isGrounded; 109 | [SerializeField] 110 | private bool m_isShuttingDown; 111 | [SerializeField] 112 | private int m_points; 113 | [SerializeField] 114 | private bool m_isGameOver; 115 | 116 | 117 | private void OnEnable() 118 | { 119 | m_stopwatch = new Stopwatch(); 120 | m_stopwatch.Start(); 121 | m_ticks = 0; 122 | m_points = 0; 123 | m_isGrounded = false; 124 | m_lastPressedKey = KeyCode.None; 125 | m_isShuttingDown = false; 126 | m_isGameOver = false; 127 | } 128 | 129 | private void Add(ILevelWindow window) 130 | { 131 | m_windows.Add(window); 132 | } 133 | 134 | private void Remove(ILevelWindow window) 135 | { 136 | m_windows.Remove(window); 137 | if (m_windows.Count == 0 && !m_isShuttingDown) 138 | { 139 | Close(); 140 | } 141 | } 142 | 143 | private void Add(CoinWindow window) 144 | { 145 | m_coinWindows.Add(window); 146 | } 147 | 148 | private void Add(JumpPadWindow window) 149 | { 150 | m_jumpPadWindows.Add(window); 151 | } 152 | 153 | private void Add(FinishLineWindow window) 154 | { 155 | m_finishLineWindow = window; 156 | } 157 | 158 | private void CloseAll() 159 | { 160 | for (var i = m_windows.Count - 1; i >= 0; i--) 161 | { 162 | m_windows[i].Close(); 163 | } 164 | 165 | Close(); 166 | } 167 | 168 | private void Restart() 169 | { 170 | CloseAll(); 171 | Play(); 172 | } 173 | 174 | private void OnGUI() 175 | { 176 | DisplayInfo(); 177 | 178 | Focus(); 179 | 180 | if(m_isGameOver) 181 | return; 182 | 183 | if (Event.current.type == EventType.KeyDown) 184 | { 185 | m_lastPressedKey = Event.current.keyCode; 186 | } 187 | 188 | if(m_stopwatch.ElapsedMilliseconds < Info.TICK_RATE_MILLISECONDS) 189 | return; 190 | 191 | m_stopwatch.Stop(); 192 | 193 | Tick(); 194 | 195 | m_stopwatch.Restart(); 196 | 197 | m_lastPressedKey = KeyCode.None; 198 | } 199 | 200 | private void Tick() 201 | { 202 | m_ticks = (m_ticks + 1) % 100000; 203 | RecalculateRects(); 204 | 205 | var currentPlayerPosition = m_playerPosition; 206 | var previousPlayerPosition = m_previousPlayerPosition; 207 | var positionDiff = currentPlayerPosition - previousPlayerPosition; 208 | 209 | var inputPosition = Vector2.zero; 210 | switch (m_lastPressedKey) 211 | { 212 | case KeyCode.W: 213 | case KeyCode.UpArrow: 214 | if(m_isGrounded) 215 | inputPosition.y -= Info.PLAYER_JUMP_FORCE; 216 | break; 217 | // case KeyCode.S: 218 | // case KeyCode.DownArrow: 219 | // targetPosition.y += Info.PLAYER_SPEED; 220 | // break; 221 | case KeyCode.A: 222 | case KeyCode.LeftArrow: 223 | inputPosition.x -= Info.PLAYER_SPEED; 224 | break; 225 | case KeyCode.D: 226 | case KeyCode.RightArrow: 227 | inputPosition.x += Info.PLAYER_SPEED; 228 | break; 229 | } 230 | 231 | var gravity = m_isGrounded ? 0f : Info.GRAVITY; 232 | currentPlayerPosition += (positionDiff * Info.FRICTION) + inputPosition + new Vector2(0f, gravity); 233 | 234 | CheckBounds(in currentPlayerPosition, out var boundsCollisionData); 235 | 236 | if (boundsCollisionData.AllPointsAreOutsideAllRects()) 237 | { 238 | m_previousPlayerPosition = m_playerPosition; 239 | } 240 | 241 | else if (boundsCollisionData.AllPointsAreInsideAnyRect()) 242 | { 243 | m_previousPlayerPosition = m_playerPosition; 244 | m_playerPosition = currentPlayerPosition; 245 | } 246 | 247 | else if (boundsCollisionData.AtLeastOnePointIsInsideAnyRect()) 248 | { 249 | previousPlayerPosition = m_playerPosition; 250 | 251 | //Left 252 | if(boundsCollisionData.topLeftCollisionRectIndex == -1 && boundsCollisionData.bottomLeftCollisionRectIndex == -1) 253 | { 254 | var validRectIndex = boundsCollisionData.topRightCollisionRectIndex != -1 ? boundsCollisionData.topRightCollisionRectIndex : boundsCollisionData.bottomRightCollisionRectIndex; 255 | var validRect = m_rects[validRectIndex]; 256 | currentPlayerPosition.x = validRect.position.x; 257 | previousPlayerPosition.x = currentPlayerPosition.x + positionDiff.x * Info.COLLISION_SPEED_MULTIPLIER; 258 | } 259 | 260 | //Right 261 | if(boundsCollisionData.topRightCollisionRectIndex == -1 && boundsCollisionData.bottomRightCollisionRectIndex == -1) 262 | { 263 | var validRectIndex = boundsCollisionData.topLeftCollisionRectIndex != -1 ? boundsCollisionData.topLeftCollisionRectIndex : boundsCollisionData.bottomLeftCollisionRectIndex; 264 | var validRect = m_rects[validRectIndex]; 265 | currentPlayerPosition.x = validRect.position.x + validRect.size.x - Info.PlayerSize.x; 266 | previousPlayerPosition.x = currentPlayerPosition.x + positionDiff.x * Info.COLLISION_SPEED_MULTIPLIER; 267 | } 268 | 269 | //Top 270 | if(boundsCollisionData.topLeftCollisionRectIndex == -1 && boundsCollisionData.topRightCollisionRectIndex == -1) 271 | { 272 | var validRectIndex = boundsCollisionData.bottomLeftCollisionRectIndex != -1 ? boundsCollisionData.bottomLeftCollisionRectIndex : boundsCollisionData.bottomRightCollisionRectIndex; 273 | var validRect = m_rects[validRectIndex]; 274 | currentPlayerPosition.y = validRect.position.y; 275 | previousPlayerPosition.y = currentPlayerPosition.y + positionDiff.y * Info.COLLISION_SPEED_MULTIPLIER; 276 | } 277 | 278 | //Bottom 279 | if (boundsCollisionData.bottomLeftCollisionRectIndex == -1 && boundsCollisionData.bottomRightCollisionRectIndex == -1) 280 | { 281 | var validRectIndex = boundsCollisionData.topLeftCollisionRectIndex != -1 ? boundsCollisionData.topLeftCollisionRectIndex : boundsCollisionData.topRightCollisionRectIndex; 282 | var validRect = m_rects[validRectIndex]; 283 | currentPlayerPosition.y = validRect.position.y + validRect.size.y - Info.PlayerSize.y; 284 | previousPlayerPosition.y = currentPlayerPosition.y + positionDiff.y * Info.COLLISION_SPEED_MULTIPLIER; 285 | } 286 | 287 | var topLeftCollisionPoint = new Vector2(currentPlayerPosition.x - Info.STEP_UP_X_THRESHOLD, currentPlayerPosition.y); 288 | var bottomLeftCollisionPoint = new Vector2(currentPlayerPosition.x - Info.STEP_UP_X_THRESHOLD, currentPlayerPosition.y + Info.PlayerSize.y - Info.STEP_UP_Y_THRESHOLD); 289 | var topRightCollisionPoint = new Vector2(currentPlayerPosition.x + Info.PlayerSize.x + Info.STEP_UP_X_THRESHOLD, currentPlayerPosition.y); 290 | var bottomRightCollisionPoint = new Vector2(currentPlayerPosition.x + Info.PlayerSize.x + Info.STEP_UP_X_THRESHOLD, currentPlayerPosition.y + Info.PlayerSize.y - Info.STEP_UP_Y_THRESHOLD); 291 | 292 | var canMoveLeft = CheckIfPointIsWithinAnyRect(topLeftCollisionPoint) && CheckIfPointIsWithinAnyRect(bottomLeftCollisionPoint); 293 | var canMoveRight = CheckIfPointIsWithinAnyRect(topRightCollisionPoint) && CheckIfPointIsWithinAnyRect(bottomRightCollisionPoint); 294 | 295 | if (!canMoveLeft) 296 | { 297 | if(currentPlayerPosition.x < previousPlayerPosition.x) 298 | { 299 | currentPlayerPosition.x = previousPlayerPosition.x; 300 | } 301 | } 302 | 303 | if (!canMoveRight) 304 | { 305 | if (currentPlayerPosition.x > previousPlayerPosition.x) 306 | { 307 | currentPlayerPosition.x = previousPlayerPosition.x; 308 | } 309 | } 310 | 311 | m_previousPlayerPosition = previousPlayerPosition; 312 | m_playerPosition = currentPlayerPosition; 313 | } 314 | 315 | var groundedCheckPointBottomLeft = new Vector2(m_playerPosition.x, m_playerPosition.y + Info.PlayerSize.y); 316 | var groundedCheckPointBottomRight = new Vector2(m_playerPosition.x + Info.PlayerSize.x, m_playerPosition.y + Info.PlayerSize.y); 317 | m_isGrounded = !CheckIfPointIsWithinAnyRect(in groundedCheckPointBottomLeft) || !CheckIfPointIsWithinAnyRect(in groundedCheckPointBottomRight); 318 | if (m_isGrounded) 319 | { 320 | m_playerPosition.y = m_previousPlayerPosition.y; 321 | } 322 | 323 | for (var i = 0; i < m_jumpPadWindows.Count; i++) 324 | { 325 | var jumpPadWindow = m_jumpPadWindows[i]; 326 | if (jumpPadWindow.isPlayerOnJumpPad) 327 | { 328 | m_previousPlayerPosition.y += Info.JUMP_PAD_FORCE; 329 | } 330 | } 331 | 332 | for (var i = m_coinWindows.Count - 1; i >= 0; i--) 333 | { 334 | var coinWindow = m_coinWindows[i]; 335 | if (coinWindow.isCollected) 336 | { 337 | m_points++; 338 | m_coinWindows.RemoveAt(i); 339 | } 340 | } 341 | 342 | if (m_finishLineWindow != null && m_finishLineWindow.isInFinishLine) 343 | { 344 | m_isGameOver = true; 345 | } 346 | 347 | var playerArgs = new PlayerArgs 348 | { 349 | time = m_ticks, 350 | center = new Vector2(m_playerPosition.x + Info.PlayerSize.x / 2, m_playerPosition.y + Info.PlayerSize.y / 2), 351 | size = Info.PlayerSize 352 | }; 353 | 354 | for (var index = 0; index < m_windows.Count; index++) 355 | { 356 | var window = m_windows[index]; 357 | window.Tick(playerArgs); 358 | } 359 | } 360 | 361 | private void RecalculateRects() 362 | { 363 | m_rects.Clear(); 364 | for (var i = 0; i < m_windows.Count; i++) 365 | { 366 | var window = m_windows[i]; 367 | var windowRect = window.position; 368 | windowRect.position = new Vector2(windowRect.position.x, windowRect.position.y - 18f); 369 | windowRect.size = new Vector2(windowRect.size.x, windowRect.size.y + 18f); 370 | m_rects.Add(windowRect); 371 | } 372 | } 373 | 374 | private void CheckBounds(in Vector2 targetPosition, out BoundsCollisionData boundsCollisionData) 375 | { 376 | boundsCollisionData = BoundsCollisionData.Empty; 377 | var playerSize = Info.PlayerSize; 378 | for (var index = 0; index < m_rects.Count; index++) 379 | { 380 | var windowRect = m_rects[index]; 381 | var topLeft = new Vector2(targetPosition.x, targetPosition.y); 382 | var topRight = new Vector2(targetPosition.x + playerSize.x, targetPosition.y); 383 | var bottomLeft = new Vector2(targetPosition.x, targetPosition.y + playerSize.y); 384 | var bottomRight = new Vector2(targetPosition.x + playerSize.x, targetPosition.y + playerSize.y); 385 | 386 | if(windowRect.Contains(topLeft)) 387 | { 388 | boundsCollisionData.topLeftCollisionRectIndex = index; 389 | } 390 | if(windowRect.Contains(bottomLeft)) 391 | { 392 | boundsCollisionData.bottomLeftCollisionRectIndex = index; 393 | } 394 | if(windowRect.Contains(topRight)) 395 | { 396 | boundsCollisionData.topRightCollisionRectIndex = index; 397 | } 398 | if(windowRect.Contains(bottomRight)) 399 | { 400 | boundsCollisionData.bottomRightCollisionRectIndex = index; 401 | } 402 | } 403 | } 404 | 405 | private bool CheckIfPointIsWithinAnyRect(in Vector2 point) 406 | { 407 | for (var i = 0; i < m_rects.Count; i++) 408 | { 409 | var rect = m_rects[i]; 410 | if (rect.Contains(point)) 411 | return true; 412 | } 413 | 414 | return false; 415 | } 416 | 417 | private void DisplayInfo() 418 | { 419 | GUILayout.Label("Welcome to the Multi Editor-Window Platformer Game!"); 420 | EditorGUILayout.Space(); 421 | GUILayout.Label("Controls:"); 422 | GUILayout.Label("Up Arrow - Jump"); 423 | GUILayout.Label("Left Arrow - Move Left"); 424 | GUILayout.Label("Right Arrow - Move Right"); 425 | EditorGUILayout.Space(); 426 | EditorGUILayout.LabelField("Points", m_points.ToString()); 427 | if (GUILayout.Button("Restart")) 428 | { 429 | Restart(); 430 | } 431 | } 432 | 433 | private void OnDestroy() 434 | { 435 | m_isShuttingDown = true; 436 | for (var i = m_windows.Count - 1; i >= 0; i--) 437 | { 438 | var platformWindow = m_windows[i]; 439 | platformWindow.Close(); 440 | } 441 | } 442 | } 443 | } -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 26 7 | productGUID: 71e5a4d512f36b44d984c638abbaa2c7 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: Multi-Window-Game-Unity-Editor 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | unsupportedMSAAFallback: 0 52 | m_SpriteBatchVertexThreshold: 300 53 | m_MTRendering: 1 54 | mipStripping: 0 55 | numberOfMipsStripped: 0 56 | numberOfMipsStrippedPerMipmapLimitGroup: {} 57 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 58 | iosShowActivityIndicatorOnLoading: -1 59 | androidShowActivityIndicatorOnLoading: -1 60 | iosUseCustomAppBackgroundBehavior: 0 61 | allowedAutorotateToPortrait: 1 62 | allowedAutorotateToPortraitUpsideDown: 1 63 | allowedAutorotateToLandscapeRight: 1 64 | allowedAutorotateToLandscapeLeft: 1 65 | useOSAutorotation: 1 66 | use32BitDisplayBuffer: 1 67 | preserveFramebufferAlpha: 0 68 | disableDepthAndStencilBuffers: 0 69 | androidStartInFullscreen: 1 70 | androidRenderOutsideSafeArea: 1 71 | androidUseSwappy: 1 72 | androidBlitType: 0 73 | androidResizableWindow: 0 74 | androidDefaultWindowWidth: 1920 75 | androidDefaultWindowHeight: 1080 76 | androidMinimumWindowWidth: 400 77 | androidMinimumWindowHeight: 300 78 | androidFullscreenMode: 1 79 | androidAutoRotationBehavior: 1 80 | defaultIsNativeResolution: 1 81 | macRetinaSupport: 1 82 | runInBackground: 1 83 | captureSingleScreen: 0 84 | muteOtherAudioSources: 0 85 | Prepare IOS For Recording: 0 86 | Force IOS Speakers When Recording: 0 87 | deferSystemGesturesMode: 0 88 | hideHomeButton: 0 89 | submitAnalytics: 1 90 | usePlayerLog: 1 91 | dedicatedServerOptimizations: 0 92 | bakeCollisionMeshes: 0 93 | forceSingleInstance: 0 94 | useFlipModelSwapchain: 1 95 | resizableWindow: 0 96 | useMacAppStoreValidation: 0 97 | macAppStoreCategory: public.app-category.games 98 | gpuSkinning: 1 99 | xboxPIXTextureCapture: 0 100 | xboxEnableAvatar: 0 101 | xboxEnableKinect: 0 102 | xboxEnableKinectAutoTracking: 0 103 | xboxEnableFitness: 0 104 | visibleInBackground: 1 105 | allowFullscreenSwitch: 1 106 | fullscreenMode: 1 107 | xboxSpeechDB: 0 108 | xboxEnableHeadOrientation: 0 109 | xboxEnableGuest: 0 110 | xboxEnablePIXSampling: 0 111 | metalFramebufferOnly: 0 112 | xboxOneResolution: 0 113 | xboxOneSResolution: 0 114 | xboxOneXResolution: 3 115 | xboxOneMonoLoggingLevel: 0 116 | xboxOneLoggingLevel: 1 117 | xboxOneDisableEsram: 0 118 | xboxOneEnableTypeOptimization: 0 119 | xboxOnePresentImmediateThreshold: 0 120 | switchQueueCommandMemory: 0 121 | switchQueueControlMemory: 16384 122 | switchQueueComputeMemory: 262144 123 | switchNVNShaderPoolsGranularity: 33554432 124 | switchNVNDefaultPoolsGranularity: 16777216 125 | switchNVNOtherPoolsGranularity: 16777216 126 | switchGpuScratchPoolGranularity: 2097152 127 | switchAllowGpuScratchShrinking: 0 128 | switchNVNMaxPublicTextureIDCount: 0 129 | switchNVNMaxPublicSamplerIDCount: 0 130 | switchNVNGraphicsFirmwareMemory: 32 131 | switchMaxWorkerMultiple: 8 132 | stadiaPresentMode: 0 133 | stadiaTargetFramerate: 0 134 | vulkanNumSwapchainBuffers: 3 135 | vulkanEnableSetSRGBWrite: 0 136 | vulkanEnablePreTransform: 1 137 | vulkanEnableLateAcquireNextImage: 0 138 | vulkanEnableCommandBufferRecycling: 1 139 | loadStoreDebugModeEnabled: 0 140 | visionOSBundleVersion: 1.0 141 | tvOSBundleVersion: 1.0 142 | bundleVersion: 0.1 143 | preloadedAssets: [] 144 | metroInputSource: 0 145 | wsaTransparentSwapchain: 0 146 | m_HolographicPauseOnTrackingLoss: 1 147 | xboxOneDisableKinectGpuReservation: 1 148 | xboxOneEnable7thCore: 1 149 | vrSettings: 150 | enable360StereoCapture: 0 151 | isWsaHolographicRemotingEnabled: 0 152 | enableFrameTimingStats: 0 153 | enableOpenGLProfilerGPURecorders: 1 154 | allowHDRDisplaySupport: 0 155 | useHDRDisplay: 0 156 | hdrBitDepth: 0 157 | m_ColorGamuts: 00000000 158 | targetPixelDensity: 30 159 | resolutionScalingMode: 0 160 | resetResolutionOnWindowResize: 0 161 | androidSupportedAspectRatio: 1 162 | androidMaxAspectRatio: 2.1 163 | applicationIdentifier: {} 164 | buildNumber: 165 | Standalone: 0 166 | VisionOS: 0 167 | iPhone: 0 168 | tvOS: 0 169 | overrideDefaultApplicationIdentifier: 0 170 | AndroidBundleVersionCode: 1 171 | AndroidMinSdkVersion: 22 172 | AndroidTargetSdkVersion: 0 173 | AndroidPreferredInstallLocation: 1 174 | aotOptions: 175 | stripEngineCode: 1 176 | iPhoneStrippingLevel: 0 177 | iPhoneScriptCallOptimization: 0 178 | ForceInternetPermission: 0 179 | ForceSDCardPermission: 0 180 | CreateWallpaper: 0 181 | APKExpansionFiles: 0 182 | keepLoadedShadersAlive: 0 183 | StripUnusedMeshComponents: 1 184 | strictShaderVariantMatching: 0 185 | VertexChannelCompressionMask: 4054 186 | iPhoneSdkVersion: 988 187 | iOSTargetOSVersionString: 12.0 188 | tvOSSdkVersion: 0 189 | tvOSRequireExtendedGameController: 0 190 | tvOSTargetOSVersionString: 12.0 191 | VisionOSSdkVersion: 0 192 | VisionOSTargetOSVersionString: 1.0 193 | uIPrerenderedIcon: 0 194 | uIRequiresPersistentWiFi: 0 195 | uIRequiresFullScreen: 1 196 | uIStatusBarHidden: 1 197 | uIExitOnSuspend: 0 198 | uIStatusBarStyle: 0 199 | appleTVSplashScreen: {fileID: 0} 200 | appleTVSplashScreen2x: {fileID: 0} 201 | tvOSSmallIconLayers: [] 202 | tvOSSmallIconLayers2x: [] 203 | tvOSLargeIconLayers: [] 204 | tvOSLargeIconLayers2x: [] 205 | tvOSTopShelfImageLayers: [] 206 | tvOSTopShelfImageLayers2x: [] 207 | tvOSTopShelfImageWideLayers: [] 208 | tvOSTopShelfImageWideLayers2x: [] 209 | iOSLaunchScreenType: 0 210 | iOSLaunchScreenPortrait: {fileID: 0} 211 | iOSLaunchScreenLandscape: {fileID: 0} 212 | iOSLaunchScreenBackgroundColor: 213 | serializedVersion: 2 214 | rgba: 0 215 | iOSLaunchScreenFillPct: 100 216 | iOSLaunchScreenSize: 100 217 | iOSLaunchScreenCustomXibPath: 218 | iOSLaunchScreeniPadType: 0 219 | iOSLaunchScreeniPadImage: {fileID: 0} 220 | iOSLaunchScreeniPadBackgroundColor: 221 | serializedVersion: 2 222 | rgba: 0 223 | iOSLaunchScreeniPadFillPct: 100 224 | iOSLaunchScreeniPadSize: 100 225 | iOSLaunchScreeniPadCustomXibPath: 226 | iOSLaunchScreenCustomStoryboardPath: 227 | iOSLaunchScreeniPadCustomStoryboardPath: 228 | iOSDeviceRequirements: [] 229 | iOSURLSchemes: [] 230 | macOSURLSchemes: [] 231 | iOSBackgroundModes: 0 232 | iOSMetalForceHardShadows: 0 233 | metalEditorSupport: 1 234 | metalAPIValidation: 1 235 | metalCompileShaderBinary: 0 236 | iOSRenderExtraFrameOnPause: 0 237 | iosCopyPluginsCodeInsteadOfSymlink: 0 238 | appleDeveloperTeamID: 239 | iOSManualSigningProvisioningProfileID: 240 | tvOSManualSigningProvisioningProfileID: 241 | VisionOSManualSigningProvisioningProfileID: 242 | iOSManualSigningProvisioningProfileType: 0 243 | tvOSManualSigningProvisioningProfileType: 0 244 | VisionOSManualSigningProvisioningProfileType: 0 245 | appleEnableAutomaticSigning: 0 246 | iOSRequireARKit: 0 247 | iOSAutomaticallyDetectAndAddCapabilities: 1 248 | appleEnableProMotion: 0 249 | shaderPrecisionModel: 0 250 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 251 | templatePackageId: com.unity.template.3d@8.1.3 252 | templateDefaultScene: Assets/Scenes/SampleScene.unity 253 | useCustomMainManifest: 0 254 | useCustomLauncherManifest: 0 255 | useCustomMainGradleTemplate: 0 256 | useCustomLauncherGradleManifest: 0 257 | useCustomBaseGradleTemplate: 0 258 | useCustomGradlePropertiesTemplate: 0 259 | useCustomGradleSettingsTemplate: 0 260 | useCustomProguardFile: 0 261 | AndroidTargetArchitectures: 1 262 | AndroidTargetDevices: 0 263 | AndroidSplashScreenScale: 0 264 | androidSplashScreen: {fileID: 0} 265 | AndroidKeystoreName: 266 | AndroidKeyaliasName: 267 | AndroidEnableArmv9SecurityFeatures: 0 268 | AndroidBuildApkPerCpuArchitecture: 0 269 | AndroidTVCompatibility: 0 270 | AndroidIsGame: 1 271 | AndroidEnableTango: 0 272 | androidEnableBanner: 1 273 | androidUseLowAccuracyLocation: 0 274 | androidUseCustomKeystore: 0 275 | m_AndroidBanners: 276 | - width: 320 277 | height: 180 278 | banner: {fileID: 0} 279 | androidGamepadSupportLevel: 0 280 | chromeosInputEmulation: 1 281 | AndroidMinifyRelease: 0 282 | AndroidMinifyDebug: 0 283 | AndroidValidateAppBundleSize: 1 284 | AndroidAppBundleSizeToValidate: 150 285 | m_BuildTargetIcons: [] 286 | m_BuildTargetPlatformIcons: [] 287 | m_BuildTargetBatching: 288 | - m_BuildTarget: Standalone 289 | m_StaticBatching: 1 290 | m_DynamicBatching: 0 291 | - m_BuildTarget: tvOS 292 | m_StaticBatching: 1 293 | m_DynamicBatching: 0 294 | - m_BuildTarget: Android 295 | m_StaticBatching: 1 296 | m_DynamicBatching: 0 297 | - m_BuildTarget: iPhone 298 | m_StaticBatching: 1 299 | m_DynamicBatching: 0 300 | - m_BuildTarget: WebGL 301 | m_StaticBatching: 0 302 | m_DynamicBatching: 0 303 | m_BuildTargetShaderSettings: [] 304 | m_BuildTargetGraphicsJobs: 305 | - m_BuildTarget: MacStandaloneSupport 306 | m_GraphicsJobs: 0 307 | - m_BuildTarget: Switch 308 | m_GraphicsJobs: 1 309 | - m_BuildTarget: MetroSupport 310 | m_GraphicsJobs: 1 311 | - m_BuildTarget: AppleTVSupport 312 | m_GraphicsJobs: 0 313 | - m_BuildTarget: BJMSupport 314 | m_GraphicsJobs: 1 315 | - m_BuildTarget: LinuxStandaloneSupport 316 | m_GraphicsJobs: 1 317 | - m_BuildTarget: PS4Player 318 | m_GraphicsJobs: 1 319 | - m_BuildTarget: iOSSupport 320 | m_GraphicsJobs: 0 321 | - m_BuildTarget: WindowsStandaloneSupport 322 | m_GraphicsJobs: 1 323 | - m_BuildTarget: XboxOnePlayer 324 | m_GraphicsJobs: 1 325 | - m_BuildTarget: LuminSupport 326 | m_GraphicsJobs: 0 327 | - m_BuildTarget: AndroidPlayer 328 | m_GraphicsJobs: 0 329 | - m_BuildTarget: WebGLSupport 330 | m_GraphicsJobs: 0 331 | m_BuildTargetGraphicsJobMode: 332 | - m_BuildTarget: PS4Player 333 | m_GraphicsJobMode: 0 334 | - m_BuildTarget: XboxOnePlayer 335 | m_GraphicsJobMode: 0 336 | m_BuildTargetGraphicsAPIs: 337 | - m_BuildTarget: AndroidPlayer 338 | m_APIs: 150000000b000000 339 | m_Automatic: 1 340 | - m_BuildTarget: iOSSupport 341 | m_APIs: 10000000 342 | m_Automatic: 1 343 | - m_BuildTarget: AppleTVSupport 344 | m_APIs: 10000000 345 | m_Automatic: 1 346 | - m_BuildTarget: WebGLSupport 347 | m_APIs: 0b000000 348 | m_Automatic: 1 349 | m_BuildTargetVRSettings: 350 | - m_BuildTarget: Standalone 351 | m_Enabled: 0 352 | m_Devices: 353 | - Oculus 354 | - OpenVR 355 | m_DefaultShaderChunkSizeInMB: 16 356 | m_DefaultShaderChunkCount: 0 357 | openGLRequireES31: 0 358 | openGLRequireES31AEP: 0 359 | openGLRequireES32: 0 360 | m_TemplateCustomTags: {} 361 | mobileMTRendering: 362 | Android: 1 363 | iPhone: 1 364 | tvOS: 1 365 | m_BuildTargetGroupLightmapEncodingQuality: 366 | - m_BuildTarget: Android 367 | m_EncodingQuality: 1 368 | - m_BuildTarget: iPhone 369 | m_EncodingQuality: 1 370 | - m_BuildTarget: tvOS 371 | m_EncodingQuality: 1 372 | m_BuildTargetGroupHDRCubemapEncodingQuality: 373 | - m_BuildTarget: Android 374 | m_EncodingQuality: 1 375 | - m_BuildTarget: iPhone 376 | m_EncodingQuality: 1 377 | - m_BuildTarget: tvOS 378 | m_EncodingQuality: 1 379 | m_BuildTargetGroupLightmapSettings: [] 380 | m_BuildTargetGroupLoadStoreDebugModeSettings: [] 381 | m_BuildTargetNormalMapEncoding: 382 | - m_BuildTarget: Android 383 | m_Encoding: 1 384 | - m_BuildTarget: iPhone 385 | m_Encoding: 1 386 | - m_BuildTarget: tvOS 387 | m_Encoding: 1 388 | m_BuildTargetDefaultTextureCompressionFormat: 389 | - m_BuildTarget: Android 390 | m_Format: 3 391 | playModeTestRunnerEnabled: 0 392 | runPlayModeTestAsEditModeTest: 0 393 | actionOnDotNetUnhandledException: 1 394 | enableInternalProfiler: 0 395 | logObjCUncaughtExceptions: 1 396 | enableCrashReportAPI: 0 397 | cameraUsageDescription: 398 | locationUsageDescription: 399 | microphoneUsageDescription: 400 | bluetoothUsageDescription: 401 | macOSTargetOSVersion: 10.13.0 402 | switchNMETAOverride: 403 | switchNetLibKey: 404 | switchSocketMemoryPoolSize: 6144 405 | switchSocketAllocatorPoolSize: 128 406 | switchSocketConcurrencyLimit: 14 407 | switchScreenResolutionBehavior: 2 408 | switchUseCPUProfiler: 0 409 | switchEnableFileSystemTrace: 0 410 | switchLTOSetting: 0 411 | switchApplicationID: 0x01004b9000490000 412 | switchNSODependencies: 413 | switchCompilerFlags: 414 | switchTitleNames_0: 415 | switchTitleNames_1: 416 | switchTitleNames_2: 417 | switchTitleNames_3: 418 | switchTitleNames_4: 419 | switchTitleNames_5: 420 | switchTitleNames_6: 421 | switchTitleNames_7: 422 | switchTitleNames_8: 423 | switchTitleNames_9: 424 | switchTitleNames_10: 425 | switchTitleNames_11: 426 | switchTitleNames_12: 427 | switchTitleNames_13: 428 | switchTitleNames_14: 429 | switchTitleNames_15: 430 | switchPublisherNames_0: 431 | switchPublisherNames_1: 432 | switchPublisherNames_2: 433 | switchPublisherNames_3: 434 | switchPublisherNames_4: 435 | switchPublisherNames_5: 436 | switchPublisherNames_6: 437 | switchPublisherNames_7: 438 | switchPublisherNames_8: 439 | switchPublisherNames_9: 440 | switchPublisherNames_10: 441 | switchPublisherNames_11: 442 | switchPublisherNames_12: 443 | switchPublisherNames_13: 444 | switchPublisherNames_14: 445 | switchPublisherNames_15: 446 | switchIcons_0: {fileID: 0} 447 | switchIcons_1: {fileID: 0} 448 | switchIcons_2: {fileID: 0} 449 | switchIcons_3: {fileID: 0} 450 | switchIcons_4: {fileID: 0} 451 | switchIcons_5: {fileID: 0} 452 | switchIcons_6: {fileID: 0} 453 | switchIcons_7: {fileID: 0} 454 | switchIcons_8: {fileID: 0} 455 | switchIcons_9: {fileID: 0} 456 | switchIcons_10: {fileID: 0} 457 | switchIcons_11: {fileID: 0} 458 | switchIcons_12: {fileID: 0} 459 | switchIcons_13: {fileID: 0} 460 | switchIcons_14: {fileID: 0} 461 | switchIcons_15: {fileID: 0} 462 | switchSmallIcons_0: {fileID: 0} 463 | switchSmallIcons_1: {fileID: 0} 464 | switchSmallIcons_2: {fileID: 0} 465 | switchSmallIcons_3: {fileID: 0} 466 | switchSmallIcons_4: {fileID: 0} 467 | switchSmallIcons_5: {fileID: 0} 468 | switchSmallIcons_6: {fileID: 0} 469 | switchSmallIcons_7: {fileID: 0} 470 | switchSmallIcons_8: {fileID: 0} 471 | switchSmallIcons_9: {fileID: 0} 472 | switchSmallIcons_10: {fileID: 0} 473 | switchSmallIcons_11: {fileID: 0} 474 | switchSmallIcons_12: {fileID: 0} 475 | switchSmallIcons_13: {fileID: 0} 476 | switchSmallIcons_14: {fileID: 0} 477 | switchSmallIcons_15: {fileID: 0} 478 | switchManualHTML: 479 | switchAccessibleURLs: 480 | switchLegalInformation: 481 | switchMainThreadStackSize: 1048576 482 | switchPresenceGroupId: 483 | switchLogoHandling: 0 484 | switchReleaseVersion: 0 485 | switchDisplayVersion: 1.0.0 486 | switchStartupUserAccount: 0 487 | switchSupportedLanguagesMask: 0 488 | switchLogoType: 0 489 | switchApplicationErrorCodeCategory: 490 | switchUserAccountSaveDataSize: 0 491 | switchUserAccountSaveDataJournalSize: 0 492 | switchApplicationAttribute: 0 493 | switchCardSpecSize: -1 494 | switchCardSpecClock: -1 495 | switchRatingsMask: 0 496 | switchRatingsInt_0: 0 497 | switchRatingsInt_1: 0 498 | switchRatingsInt_2: 0 499 | switchRatingsInt_3: 0 500 | switchRatingsInt_4: 0 501 | switchRatingsInt_5: 0 502 | switchRatingsInt_6: 0 503 | switchRatingsInt_7: 0 504 | switchRatingsInt_8: 0 505 | switchRatingsInt_9: 0 506 | switchRatingsInt_10: 0 507 | switchRatingsInt_11: 0 508 | switchRatingsInt_12: 0 509 | switchLocalCommunicationIds_0: 510 | switchLocalCommunicationIds_1: 511 | switchLocalCommunicationIds_2: 512 | switchLocalCommunicationIds_3: 513 | switchLocalCommunicationIds_4: 514 | switchLocalCommunicationIds_5: 515 | switchLocalCommunicationIds_6: 516 | switchLocalCommunicationIds_7: 517 | switchParentalControl: 0 518 | switchAllowsScreenshot: 1 519 | switchAllowsVideoCapturing: 1 520 | switchAllowsRuntimeAddOnContentInstall: 0 521 | switchDataLossConfirmation: 0 522 | switchUserAccountLockEnabled: 0 523 | switchSystemResourceMemory: 16777216 524 | switchSupportedNpadStyles: 22 525 | switchNativeFsCacheSize: 32 526 | switchIsHoldTypeHorizontal: 0 527 | switchSupportedNpadCount: 8 528 | switchEnableTouchScreen: 1 529 | switchSocketConfigEnabled: 0 530 | switchTcpInitialSendBufferSize: 32 531 | switchTcpInitialReceiveBufferSize: 64 532 | switchTcpAutoSendBufferSizeMax: 256 533 | switchTcpAutoReceiveBufferSizeMax: 256 534 | switchUdpSendBufferSize: 9 535 | switchUdpReceiveBufferSize: 42 536 | switchSocketBufferEfficiency: 4 537 | switchSocketInitializeEnabled: 1 538 | switchNetworkInterfaceManagerInitializeEnabled: 1 539 | switchUseNewStyleFilepaths: 1 540 | switchUseLegacyFmodPriorities: 0 541 | switchUseMicroSleepForYield: 1 542 | switchEnableRamDiskSupport: 0 543 | switchMicroSleepForYieldTime: 25 544 | switchRamDiskSpaceSize: 12 545 | ps4NPAgeRating: 12 546 | ps4NPTitleSecret: 547 | ps4NPTrophyPackPath: 548 | ps4ParentalLevel: 11 549 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 550 | ps4Category: 0 551 | ps4MasterVersion: 01.00 552 | ps4AppVersion: 01.00 553 | ps4AppType: 0 554 | ps4ParamSfxPath: 555 | ps4VideoOutPixelFormat: 0 556 | ps4VideoOutInitialWidth: 1920 557 | ps4VideoOutBaseModeInitialWidth: 1920 558 | ps4VideoOutReprojectionRate: 60 559 | ps4PronunciationXMLPath: 560 | ps4PronunciationSIGPath: 561 | ps4BackgroundImagePath: 562 | ps4StartupImagePath: 563 | ps4StartupImagesFolder: 564 | ps4IconImagesFolder: 565 | ps4SaveDataImagePath: 566 | ps4SdkOverride: 567 | ps4BGMPath: 568 | ps4ShareFilePath: 569 | ps4ShareOverlayImagePath: 570 | ps4PrivacyGuardImagePath: 571 | ps4ExtraSceSysFile: 572 | ps4NPtitleDatPath: 573 | ps4RemotePlayKeyAssignment: -1 574 | ps4RemotePlayKeyMappingDir: 575 | ps4PlayTogetherPlayerCount: 0 576 | ps4EnterButtonAssignment: 1 577 | ps4ApplicationParam1: 0 578 | ps4ApplicationParam2: 0 579 | ps4ApplicationParam3: 0 580 | ps4ApplicationParam4: 0 581 | ps4DownloadDataSize: 0 582 | ps4GarlicHeapSize: 2048 583 | ps4ProGarlicHeapSize: 2560 584 | playerPrefsMaxSize: 32768 585 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 586 | ps4pnSessions: 1 587 | ps4pnPresence: 1 588 | ps4pnFriends: 1 589 | ps4pnGameCustomData: 1 590 | playerPrefsSupport: 0 591 | enableApplicationExit: 0 592 | resetTempFolder: 1 593 | restrictedAudioUsageRights: 0 594 | ps4UseResolutionFallback: 0 595 | ps4ReprojectionSupport: 0 596 | ps4UseAudio3dBackend: 0 597 | ps4UseLowGarlicFragmentationMode: 1 598 | ps4SocialScreenEnabled: 0 599 | ps4ScriptOptimizationLevel: 0 600 | ps4Audio3dVirtualSpeakerCount: 14 601 | ps4attribCpuUsage: 0 602 | ps4PatchPkgPath: 603 | ps4PatchLatestPkgPath: 604 | ps4PatchChangeinfoPath: 605 | ps4PatchDayOne: 0 606 | ps4attribUserManagement: 0 607 | ps4attribMoveSupport: 0 608 | ps4attrib3DSupport: 0 609 | ps4attribShareSupport: 0 610 | ps4attribExclusiveVR: 0 611 | ps4disableAutoHideSplash: 0 612 | ps4videoRecordingFeaturesUsed: 0 613 | ps4contentSearchFeaturesUsed: 0 614 | ps4CompatibilityPS5: 0 615 | ps4AllowPS5Detection: 0 616 | ps4GPU800MHz: 1 617 | ps4attribEyeToEyeDistanceSettingVR: 0 618 | ps4IncludedModules: [] 619 | ps4attribVROutputEnabled: 0 620 | monoEnv: 621 | splashScreenBackgroundSourceLandscape: {fileID: 0} 622 | splashScreenBackgroundSourcePortrait: {fileID: 0} 623 | blurSplashScreenBackground: 1 624 | spritePackerPolicy: 625 | webGLMemorySize: 16 626 | webGLExceptionSupport: 1 627 | webGLNameFilesAsHashes: 0 628 | webGLShowDiagnostics: 0 629 | webGLDataCaching: 1 630 | webGLDebugSymbols: 0 631 | webGLEmscriptenArgs: 632 | webGLModulesDirectory: 633 | webGLTemplate: APPLICATION:Default 634 | webGLAnalyzeBuildSize: 0 635 | webGLUseEmbeddedResources: 0 636 | webGLCompressionFormat: 1 637 | webGLWasmArithmeticExceptions: 0 638 | webGLLinkerTarget: 1 639 | webGLThreadsSupport: 0 640 | webGLDecompressionFallback: 0 641 | webGLInitialMemorySize: 32 642 | webGLMaximumMemorySize: 2048 643 | webGLMemoryGrowthMode: 2 644 | webGLMemoryLinearGrowthStep: 16 645 | webGLMemoryGeometricGrowthStep: 0.2 646 | webGLMemoryGeometricGrowthCap: 96 647 | webGLPowerPreference: 2 648 | scriptingDefineSymbols: {} 649 | additionalCompilerArguments: {} 650 | platformArchitecture: {} 651 | scriptingBackend: {} 652 | il2cppCompilerConfiguration: {} 653 | il2cppCodeGeneration: {} 654 | managedStrippingLevel: 655 | EmbeddedLinux: 1 656 | GameCoreScarlett: 1 657 | GameCoreXboxOne: 1 658 | Nintendo Switch: 1 659 | PS4: 1 660 | PS5: 1 661 | QNX: 1 662 | Stadia: 1 663 | VisionOS: 1 664 | WebGL: 1 665 | Windows Store Apps: 1 666 | XboxOne: 1 667 | iPhone: 1 668 | tvOS: 1 669 | incrementalIl2cppBuild: {} 670 | suppressCommonWarnings: 1 671 | allowUnsafeCode: 0 672 | useDeterministicCompilation: 1 673 | additionalIl2CppArgs: 674 | scriptingRuntimeVersion: 1 675 | gcIncremental: 1 676 | gcWBarrierValidation: 0 677 | apiCompatibilityLevelPerPlatform: {} 678 | m_RenderingPath: 1 679 | m_MobileRenderingPath: 1 680 | metroPackageName: Multi-Window-Game-Unity-Editor 681 | metroPackageVersion: 682 | metroCertificatePath: 683 | metroCertificatePassword: 684 | metroCertificateSubject: 685 | metroCertificateIssuer: 686 | metroCertificateNotAfter: 0000000000000000 687 | metroApplicationDescription: Multi-Window-Game-Unity-Editor 688 | wsaImages: {} 689 | metroTileShortName: 690 | metroTileShowName: 0 691 | metroMediumTileShowName: 0 692 | metroLargeTileShowName: 0 693 | metroWideTileShowName: 0 694 | metroSupportStreamingInstall: 0 695 | metroLastRequiredScene: 0 696 | metroDefaultTileSize: 1 697 | metroTileForegroundText: 2 698 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 699 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 700 | metroSplashScreenUseBackgroundColor: 0 701 | syncCapabilities: 0 702 | platformCapabilities: {} 703 | metroTargetDeviceFamilies: {} 704 | metroFTAName: 705 | metroFTAFileTypes: [] 706 | metroProtocolName: 707 | vcxProjDefaultLanguage: 708 | XboxOneProductId: 709 | XboxOneUpdateKey: 710 | XboxOneSandboxId: 711 | XboxOneContentId: 712 | XboxOneTitleId: 713 | XboxOneSCId: 714 | XboxOneGameOsOverridePath: 715 | XboxOnePackagingOverridePath: 716 | XboxOneAppManifestOverridePath: 717 | XboxOneVersion: 1.0.0.0 718 | XboxOnePackageEncryption: 0 719 | XboxOnePackageUpdateGranularity: 2 720 | XboxOneDescription: 721 | XboxOneLanguage: 722 | - enus 723 | XboxOneCapability: [] 724 | XboxOneGameRating: {} 725 | XboxOneIsContentPackage: 0 726 | XboxOneEnhancedXboxCompatibilityMode: 0 727 | XboxOneEnableGPUVariability: 1 728 | XboxOneSockets: {} 729 | XboxOneSplashScreen: {fileID: 0} 730 | XboxOneAllowedProductIds: [] 731 | XboxOnePersistentLocalStorageSize: 0 732 | XboxOneXTitleMemory: 8 733 | XboxOneOverrideIdentityName: 734 | XboxOneOverrideIdentityPublisher: 735 | vrEditorSettings: {} 736 | cloudServicesEnabled: 737 | UNet: 1 738 | luminIcon: 739 | m_Name: 740 | m_ModelFolderPath: 741 | m_PortalFolderPath: 742 | luminCert: 743 | m_CertPath: 744 | m_SignPackage: 1 745 | luminIsChannelApp: 0 746 | luminVersion: 747 | m_VersionCode: 1 748 | m_VersionName: 749 | hmiPlayerDataPath: 750 | hmiForceSRGBBlit: 1 751 | embeddedLinuxEnableGamepadInput: 1 752 | hmiLogStartupTiming: 0 753 | hmiCpuConfiguration: 754 | apiCompatibilityLevel: 6 755 | activeInputHandler: 0 756 | windowsGamepadBackendHint: 0 757 | cloudProjectId: 758 | framebufferDepthMemorylessMode: 0 759 | qualitySettingsNames: [] 760 | projectName: 761 | organizationId: 762 | cloudEnabled: 0 763 | legacyClampBlendShapeWeights: 0 764 | hmiLoadingImage: {fileID: 0} 765 | platformRequiresReadableAssets: 0 766 | virtualTexturingSupportEnabled: 0 767 | insecureHttpOption: 0 768 | --------------------------------------------------------------------------------