├── .DS_Store ├── .github └── FUNDING.yml ├── .gitignore ├── Assets ├── Materials.meta ├── Materials │ ├── New Material.mat │ └── New Material.mat.meta ├── Prefabs.meta ├── Prefabs │ ├── Cube.prefab │ └── Cube.prefab.meta ├── Scenes.meta ├── Scenes │ ├── Example.unity │ └── Example.unity.meta ├── Scripts.meta └── Scripts │ ├── Example.meta │ ├── Example │ ├── ObjectExample.cs │ ├── ObjectExample.cs.meta │ ├── PoolingExample.cs │ └── PoolingExample.cs.meta │ ├── IPooling.cs │ ├── IPooling.cs.meta │ ├── Pooling.cs │ ├── Pooling.cs.meta │ ├── PoolingObject.cs │ ├── PoolingObject.cs.meta │ ├── Shaders.meta │ └── Shaders │ ├── PropertyColor.shader │ └── PropertyColor.shader.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md ├── UnityPackageManager └── manifest.json └── readmeassets └── pooling_example.gif /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mukarillo/UnityPooling/28df354dbad58659891d4b5fcda1b54a1bf11bb2/.DS_Store -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: mukarillo 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: mukarillo 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f96ef55e894494d3187d0d3a60335934 3 | folderAsset: yes 4 | timeCreated: 1526788694 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Materials/New Material.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: New Material 10 | m_Shader: {fileID: 4800000, guid: 7904191d3ebcf4e768261e25cdaf23b1, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 1 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/New Material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c7c6fa2e867f4240aef8d4a54704e7b 3 | timeCreated: 1526787588 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a7847332a1cb4730bbba88b0d34f56f 3 | folderAsset: yes 4 | timeCreated: 1526787283 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Prefabs/Cube.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1690088962221718} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1690088962221718 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4069325411543188} 22 | - component: {fileID: 33719936054101422} 23 | - component: {fileID: 65285428911343782} 24 | - component: {fileID: 23848002560597060} 25 | m_Layer: 0 26 | m_Name: Cube 27 | m_TagString: Untagged 28 | m_Icon: {fileID: 0} 29 | m_NavMeshLayer: 0 30 | m_StaticEditorFlags: 0 31 | m_IsActive: 1 32 | --- !u!4 &4069325411543188 33 | Transform: 34 | m_ObjectHideFlags: 1 35 | m_PrefabParentObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | m_GameObject: {fileID: 1690088962221718} 38 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 39 | m_LocalPosition: {x: -13, y: -6.5, z: 2.66} 40 | m_LocalScale: {x: 1, y: 1, z: 1} 41 | m_Children: [] 42 | m_Father: {fileID: 0} 43 | m_RootOrder: 0 44 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 45 | --- !u!23 &23848002560597060 46 | MeshRenderer: 47 | m_ObjectHideFlags: 1 48 | m_PrefabParentObject: {fileID: 0} 49 | m_PrefabInternal: {fileID: 100100000} 50 | m_GameObject: {fileID: 1690088962221718} 51 | m_Enabled: 1 52 | m_CastShadows: 1 53 | m_ReceiveShadows: 1 54 | m_DynamicOccludee: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 1 57 | m_ReflectionProbeUsage: 1 58 | m_Materials: 59 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 60 | m_StaticBatchInfo: 61 | firstSubMesh: 0 62 | subMeshCount: 0 63 | m_StaticBatchRoot: {fileID: 0} 64 | m_ProbeAnchor: {fileID: 0} 65 | m_LightProbeVolumeOverride: {fileID: 0} 66 | m_ScaleInLightmap: 1 67 | m_PreserveUVs: 1 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 0 71 | m_SelectedEditorRenderState: 3 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | --- !u!33 &33719936054101422 80 | MeshFilter: 81 | m_ObjectHideFlags: 1 82 | m_PrefabParentObject: {fileID: 0} 83 | m_PrefabInternal: {fileID: 100100000} 84 | m_GameObject: {fileID: 1690088962221718} 85 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 86 | --- !u!65 &65285428911343782 87 | BoxCollider: 88 | m_ObjectHideFlags: 1 89 | m_PrefabParentObject: {fileID: 0} 90 | m_PrefabInternal: {fileID: 100100000} 91 | m_GameObject: {fileID: 1690088962221718} 92 | m_Material: {fileID: 0} 93 | m_IsTrigger: 0 94 | m_Enabled: 1 95 | serializedVersion: 2 96 | m_Size: {x: 1, y: 1, z: 1} 97 | m_Center: {x: 0, y: 0, z: 0} 98 | -------------------------------------------------------------------------------- /Assets/Prefabs/Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c640d4a279acc43b885a0cd9c4b38da1 3 | timeCreated: 1526787536 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35c13d19a292144fe9e58a15765a6966 3 | folderAsset: yes 4 | timeCreated: 1526787277 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scenes/Example.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: 8 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: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 1 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 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: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &470592010 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_PrefabParentObject: {fileID: 0} 119 | m_PrefabInternal: {fileID: 0} 120 | serializedVersion: 5 121 | m_Component: 122 | - component: {fileID: 470592014} 123 | - component: {fileID: 470592013} 124 | - component: {fileID: 470592012} 125 | - component: {fileID: 470592011} 126 | m_Layer: 5 127 | m_Name: Canvas 128 | m_TagString: Untagged 129 | m_Icon: {fileID: 0} 130 | m_NavMeshLayer: 0 131 | m_StaticEditorFlags: 0 132 | m_IsActive: 1 133 | --- !u!114 &470592011 134 | MonoBehaviour: 135 | m_ObjectHideFlags: 0 136 | m_PrefabParentObject: {fileID: 0} 137 | m_PrefabInternal: {fileID: 0} 138 | m_GameObject: {fileID: 470592010} 139 | m_Enabled: 1 140 | m_EditorHideFlags: 0 141 | m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} 142 | m_Name: 143 | m_EditorClassIdentifier: 144 | m_IgnoreReversedGraphics: 1 145 | m_BlockingObjects: 0 146 | m_BlockingMask: 147 | serializedVersion: 2 148 | m_Bits: 4294967295 149 | --- !u!114 &470592012 150 | MonoBehaviour: 151 | m_ObjectHideFlags: 0 152 | m_PrefabParentObject: {fileID: 0} 153 | m_PrefabInternal: {fileID: 0} 154 | m_GameObject: {fileID: 470592010} 155 | m_Enabled: 1 156 | m_EditorHideFlags: 0 157 | m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} 158 | m_Name: 159 | m_EditorClassIdentifier: 160 | m_UiScaleMode: 0 161 | m_ReferencePixelsPerUnit: 100 162 | m_ScaleFactor: 1 163 | m_ReferenceResolution: {x: 800, y: 600} 164 | m_ScreenMatchMode: 0 165 | m_MatchWidthOrHeight: 0 166 | m_PhysicalUnit: 3 167 | m_FallbackScreenDPI: 96 168 | m_DefaultSpriteDPI: 96 169 | m_DynamicPixelsPerUnit: 1 170 | --- !u!223 &470592013 171 | Canvas: 172 | m_ObjectHideFlags: 0 173 | m_PrefabParentObject: {fileID: 0} 174 | m_PrefabInternal: {fileID: 0} 175 | m_GameObject: {fileID: 470592010} 176 | m_Enabled: 1 177 | serializedVersion: 3 178 | m_RenderMode: 0 179 | m_Camera: {fileID: 0} 180 | m_PlaneDistance: 100 181 | m_PixelPerfect: 0 182 | m_ReceivesEvents: 1 183 | m_OverrideSorting: 0 184 | m_OverridePixelPerfect: 0 185 | m_SortingBucketNormalizedSize: 0 186 | m_AdditionalShaderChannelsFlag: 0 187 | m_SortingLayerID: 0 188 | m_SortingOrder: 0 189 | m_TargetDisplay: 0 190 | --- !u!224 &470592014 191 | RectTransform: 192 | m_ObjectHideFlags: 0 193 | m_PrefabParentObject: {fileID: 0} 194 | m_PrefabInternal: {fileID: 0} 195 | m_GameObject: {fileID: 470592010} 196 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 197 | m_LocalPosition: {x: 324, y: 182.5, z: 0} 198 | m_LocalScale: {x: 1, y: 1, z: 1} 199 | m_Children: 200 | - {fileID: 777504257} 201 | m_Father: {fileID: 0} 202 | m_RootOrder: 0 203 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 204 | m_AnchorMin: {x: 0.5, y: 0.5} 205 | m_AnchorMax: {x: 0.5, y: 0.5} 206 | m_AnchoredPosition: {x: 0, y: 0} 207 | m_SizeDelta: {x: 100, y: 100} 208 | m_Pivot: {x: 0.5, y: 0.5} 209 | --- !u!1 &580156340 210 | GameObject: 211 | m_ObjectHideFlags: 0 212 | m_PrefabParentObject: {fileID: 0} 213 | m_PrefabInternal: {fileID: 0} 214 | serializedVersion: 5 215 | m_Component: 216 | - component: {fileID: 580156344} 217 | - component: {fileID: 580156343} 218 | - component: {fileID: 580156342} 219 | - component: {fileID: 580156341} 220 | m_Layer: 0 221 | m_Name: Main Camera 222 | m_TagString: MainCamera 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!81 &580156341 228 | AudioListener: 229 | m_ObjectHideFlags: 0 230 | m_PrefabParentObject: {fileID: 0} 231 | m_PrefabInternal: {fileID: 0} 232 | m_GameObject: {fileID: 580156340} 233 | m_Enabled: 1 234 | --- !u!124 &580156342 235 | Behaviour: 236 | m_ObjectHideFlags: 0 237 | m_PrefabParentObject: {fileID: 0} 238 | m_PrefabInternal: {fileID: 0} 239 | m_GameObject: {fileID: 580156340} 240 | m_Enabled: 1 241 | --- !u!20 &580156343 242 | Camera: 243 | m_ObjectHideFlags: 0 244 | m_PrefabParentObject: {fileID: 0} 245 | m_PrefabInternal: {fileID: 0} 246 | m_GameObject: {fileID: 580156340} 247 | m_Enabled: 1 248 | serializedVersion: 2 249 | m_ClearFlags: 1 250 | m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0} 251 | m_NormalizedViewPortRect: 252 | serializedVersion: 2 253 | x: 0 254 | y: 0 255 | width: 1 256 | height: 1 257 | near clip plane: 0.3 258 | far clip plane: 1000 259 | field of view: 60 260 | orthographic: 0 261 | orthographic size: 5 262 | m_Depth: -1 263 | m_CullingMask: 264 | serializedVersion: 2 265 | m_Bits: 4294967295 266 | m_RenderingPath: -1 267 | m_TargetTexture: {fileID: 0} 268 | m_TargetDisplay: 0 269 | m_TargetEye: 3 270 | m_HDR: 1 271 | m_AllowMSAA: 1 272 | m_ForceIntoRT: 0 273 | m_OcclusionCulling: 1 274 | m_StereoConvergence: 10 275 | m_StereoSeparation: 0.022 276 | --- !u!4 &580156344 277 | Transform: 278 | m_ObjectHideFlags: 0 279 | m_PrefabParentObject: {fileID: 0} 280 | m_PrefabInternal: {fileID: 0} 281 | m_GameObject: {fileID: 580156340} 282 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 283 | m_LocalPosition: {x: 0, y: 0, z: -10} 284 | m_LocalScale: {x: 1, y: 1, z: 1} 285 | m_Children: [] 286 | m_Father: {fileID: 0} 287 | m_RootOrder: 2 288 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 289 | --- !u!1 &667535033 290 | GameObject: 291 | m_ObjectHideFlags: 0 292 | m_PrefabParentObject: {fileID: 0} 293 | m_PrefabInternal: {fileID: 0} 294 | serializedVersion: 5 295 | m_Component: 296 | - component: {fileID: 667535035} 297 | - component: {fileID: 667535034} 298 | m_Layer: 0 299 | m_Name: Example 300 | m_TagString: Untagged 301 | m_Icon: {fileID: 0} 302 | m_NavMeshLayer: 0 303 | m_StaticEditorFlags: 0 304 | m_IsActive: 1 305 | --- !u!114 &667535034 306 | MonoBehaviour: 307 | m_ObjectHideFlags: 0 308 | m_PrefabParentObject: {fileID: 0} 309 | m_PrefabInternal: {fileID: 0} 310 | m_GameObject: {fileID: 667535033} 311 | m_Enabled: 1 312 | m_EditorHideFlags: 0 313 | m_Script: {fileID: 11500000, guid: 6b28a0befcaa545519ff1228e920e3b1, type: 3} 314 | m_Name: 315 | m_EditorClassIdentifier: 316 | referenceObject: {fileID: 1690088962221718, guid: c640d4a279acc43b885a0cd9c4b38da1, 317 | type: 2} 318 | uiText: {fileID: 777504258} 319 | --- !u!4 &667535035 320 | Transform: 321 | m_ObjectHideFlags: 0 322 | m_PrefabParentObject: {fileID: 0} 323 | m_PrefabInternal: {fileID: 0} 324 | m_GameObject: {fileID: 667535033} 325 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 326 | m_LocalPosition: {x: 0, y: 0, z: 0} 327 | m_LocalScale: {x: 1, y: 1, z: 1} 328 | m_Children: [] 329 | m_Father: {fileID: 0} 330 | m_RootOrder: 3 331 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 332 | --- !u!1 &777504256 333 | GameObject: 334 | m_ObjectHideFlags: 0 335 | m_PrefabParentObject: {fileID: 0} 336 | m_PrefabInternal: {fileID: 0} 337 | serializedVersion: 5 338 | m_Component: 339 | - component: {fileID: 777504257} 340 | - component: {fileID: 777504259} 341 | - component: {fileID: 777504258} 342 | m_Layer: 5 343 | m_Name: Text 344 | m_TagString: Untagged 345 | m_Icon: {fileID: 0} 346 | m_NavMeshLayer: 0 347 | m_StaticEditorFlags: 0 348 | m_IsActive: 1 349 | --- !u!224 &777504257 350 | RectTransform: 351 | m_ObjectHideFlags: 0 352 | m_PrefabParentObject: {fileID: 0} 353 | m_PrefabInternal: {fileID: 0} 354 | m_GameObject: {fileID: 777504256} 355 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 356 | m_LocalPosition: {x: -324, y: 182.5, z: 0} 357 | m_LocalScale: {x: 1, y: 1, z: 1} 358 | m_Children: [] 359 | m_Father: {fileID: 470592014} 360 | m_RootOrder: 0 361 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 362 | m_AnchorMin: {x: 0, y: 1} 363 | m_AnchorMax: {x: 0, y: 1} 364 | m_AnchoredPosition: {x: 0, y: 0} 365 | m_SizeDelta: {x: 450.65, y: 126.3} 366 | m_Pivot: {x: 0, y: 1} 367 | --- !u!114 &777504258 368 | MonoBehaviour: 369 | m_ObjectHideFlags: 0 370 | m_PrefabParentObject: {fileID: 0} 371 | m_PrefabInternal: {fileID: 0} 372 | m_GameObject: {fileID: 777504256} 373 | m_Enabled: 1 374 | m_EditorHideFlags: 0 375 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 376 | m_Name: 377 | m_EditorClassIdentifier: 378 | m_Material: {fileID: 0} 379 | m_Color: {r: 0, g: 0, b: 0, a: 1} 380 | m_RaycastTarget: 1 381 | m_OnCullStateChanged: 382 | m_PersistentCalls: 383 | m_Calls: [] 384 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 385 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 386 | m_FontData: 387 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 388 | m_FontSize: 14 389 | m_FontStyle: 0 390 | m_BestFit: 0 391 | m_MinSize: 10 392 | m_MaxSize: 40 393 | m_Alignment: 0 394 | m_AlignByGeometry: 0 395 | m_RichText: 1 396 | m_HorizontalOverflow: 0 397 | m_VerticalOverflow: 0 398 | m_LineSpacing: 1 399 | m_Text: 'Number of objects created: 20 400 | 401 | Number of objects activated: 20 402 | 403 | Number of objects deactivated: 20' 404 | --- !u!222 &777504259 405 | CanvasRenderer: 406 | m_ObjectHideFlags: 0 407 | m_PrefabParentObject: {fileID: 0} 408 | m_PrefabInternal: {fileID: 0} 409 | m_GameObject: {fileID: 777504256} 410 | --- !u!1 &2002786456 411 | GameObject: 412 | m_ObjectHideFlags: 0 413 | m_PrefabParentObject: {fileID: 0} 414 | m_PrefabInternal: {fileID: 0} 415 | serializedVersion: 5 416 | m_Component: 417 | - component: {fileID: 2002786458} 418 | - component: {fileID: 2002786457} 419 | m_Layer: 0 420 | m_Name: Directional light 421 | m_TagString: Untagged 422 | m_Icon: {fileID: 0} 423 | m_NavMeshLayer: 0 424 | m_StaticEditorFlags: 0 425 | m_IsActive: 1 426 | --- !u!108 &2002786457 427 | Light: 428 | m_ObjectHideFlags: 0 429 | m_PrefabParentObject: {fileID: 0} 430 | m_PrefabInternal: {fileID: 0} 431 | m_GameObject: {fileID: 2002786456} 432 | m_Enabled: 1 433 | serializedVersion: 8 434 | m_Type: 1 435 | m_Color: {r: 1, g: 1, b: 1, a: 1} 436 | m_Intensity: 1 437 | m_Range: 10 438 | m_SpotAngle: 30 439 | m_CookieSize: 10 440 | m_Shadows: 441 | m_Type: 0 442 | m_Resolution: -1 443 | m_CustomResolution: -1 444 | m_Strength: 1 445 | m_Bias: 0.05 446 | m_NormalBias: 0.4 447 | m_NearPlane: 0.2 448 | m_Cookie: {fileID: 0} 449 | m_DrawHalo: 0 450 | m_Flare: {fileID: 0} 451 | m_RenderMode: 0 452 | m_CullingMask: 453 | serializedVersion: 2 454 | m_Bits: 4294967295 455 | m_Lightmapping: 4 456 | m_AreaSize: {x: 1, y: 1} 457 | m_BounceIntensity: 1 458 | m_ColorTemperature: 6570 459 | m_UseColorTemperature: 0 460 | m_ShadowRadius: 0 461 | m_ShadowAngle: 0 462 | --- !u!4 &2002786458 463 | Transform: 464 | m_ObjectHideFlags: 0 465 | m_PrefabParentObject: {fileID: 0} 466 | m_PrefabInternal: {fileID: 0} 467 | m_GameObject: {fileID: 2002786456} 468 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 469 | m_LocalPosition: {x: 0, y: 0, z: -10} 470 | m_LocalScale: {x: 1, y: 1, z: 1} 471 | m_Children: [] 472 | m_Father: {fileID: 0} 473 | m_RootOrder: 1 474 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 475 | -------------------------------------------------------------------------------- /Assets/Scenes/Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 006f7042a96b645648f08509bae79c65 3 | timeCreated: 1526787291 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f2a55ec42b584f1a856f1011cd5cec5 3 | folderAsset: yes 4 | timeCreated: 1526787257 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scripts/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b59b1292241e4415b8eda8fef0d5cce 3 | folderAsset: yes 4 | timeCreated: 1526787270 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/ObjectExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System; 3 | using UnityEngine; 4 | using pooling; 5 | 6 | using Random = UnityEngine.Random; 7 | 8 | public class ObjectExample : PoolingObject { 9 | 10 | public Action OnCollectCallback; 11 | public Action OnReleaseCallback; 12 | 13 | private Renderer mRenderer; 14 | private MaterialPropertyBlock mPropBlock; 15 | 16 | void Awake() 17 | { 18 | mPropBlock = new MaterialPropertyBlock(); 19 | mRenderer = GetComponent(); 20 | } 21 | 22 | public override void OnCollect() 23 | { 24 | OnCollectCallback.Invoke(); 25 | 26 | mRenderer.GetPropertyBlock(mPropBlock); 27 | mPropBlock.SetColor("_Color", Random.ColorHSV()); 28 | mRenderer.SetPropertyBlock(mPropBlock); 29 | 30 | Invoke("OnRelease", 2f); 31 | 32 | base.OnCollect(); 33 | } 34 | 35 | public override void OnRelease() 36 | { 37 | OnReleaseCallback.Invoke(); 38 | base.OnRelease(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/ObjectExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0422bc2e2a85e4bb1b4fbfe5ec19d499 3 | timeCreated: 1526787903 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/PoolingExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using pooling; 5 | using System; 6 | using UnityEngine.UI; 7 | 8 | using Random = UnityEngine.Random; 9 | 10 | public class PoolingExample : MonoBehaviour { 11 | 12 | public GameObject referenceObject; 13 | public Text uiText; 14 | 15 | private Pooling mPooling = new Pooling(); 16 | private int mObjectAmount = 0; 17 | private int mObjectActivated = 0; 18 | private int mObjectDeactivated = 0; 19 | 20 | void Start () { 21 | mPooling.OnObjectCreationCallBack += OnCreateObject; 22 | mPooling.Initialize(10, referenceObject, transform); 23 | } 24 | 25 | private void OnCreateObject(ObjectExample obj) 26 | { 27 | obj.OnCollectCallback += OnCollectCallback; 28 | obj.OnReleaseCallback += OnReleaseCallback; 29 | mObjectAmount++; 30 | } 31 | 32 | private void OnReleaseCallback() 33 | { 34 | if(mObjectActivated > 0) 35 | mObjectActivated--; 36 | mObjectDeactivated++; 37 | RefreshUi(); 38 | } 39 | 40 | private void OnCollectCallback() 41 | { 42 | mObjectActivated++; 43 | if(mObjectDeactivated > 0) 44 | mObjectDeactivated--; 45 | RefreshUi(); 46 | } 47 | 48 | private void RefreshUi() 49 | { 50 | uiText.text = string.Format("Number of objects created: {0}\nNumber of objects activated: {1}\nNumber of objects deactivated: {2}", 51 | mObjectAmount, 52 | mObjectActivated, 53 | mObjectDeactivated 54 | ); 55 | } 56 | 57 | void Update () { 58 | if(Input.GetKeyDown(KeyCode.Space)) 59 | { 60 | var o = mPooling.Collect(); 61 | o.transform.position = new Vector3(Random.Range(-13f, 13f), Random.Range(-6.5f, 6.5f), 2.66f); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/PoolingExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b28a0befcaa545519ff1228e920e3b1 3 | timeCreated: 1526787513 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/IPooling.cs: -------------------------------------------------------------------------------- 1 | namespace pooling 2 | { 3 | public interface IPooling 4 | { 5 | string objectName { get; } 6 | bool isUsing { get; set; } 7 | void OnCollect(); 8 | void OnRelease(); 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Scripts/IPooling.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b679bcb20289247508c06d935e60ad4b 3 | timeCreated: 1526734907 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/Pooling.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace pooling 5 | { 6 | public class Pooling : List where T : MonoBehaviour, IPooling 7 | { 8 | public bool createMoreIfNeeded = true; 9 | 10 | private Transform mParent; 11 | private Vector3 mStartPos; 12 | private GameObject referenceObject; 13 | 14 | public delegate void ObjectCreationCallback(T obj); 15 | public event ObjectCreationCallback OnObjectCreationCallBack; 16 | 17 | public Pooling Initialize(GameObject refObject, Transform parent) 18 | { 19 | return Initialize(0, refObject, parent); 20 | } 21 | 22 | public Pooling Initialize(int amount, GameObject refObject, Transform parent, bool startState = false) 23 | { 24 | return Initialize(amount, refObject, parent, Vector3.zero, startState); 25 | } 26 | 27 | public Pooling Initialize(int amount, GameObject refObject, Transform parent, Vector3 worldPos, bool startState = false) 28 | { 29 | mParent = parent; 30 | mStartPos = worldPos; 31 | referenceObject = refObject; 32 | 33 | Clear(); 34 | 35 | for (var i = 0; i < amount; i++) 36 | { 37 | var obj = CreateObject(); 38 | 39 | if(startState) obj.OnCollect(); 40 | else obj.OnRelease(); 41 | 42 | Add(obj); 43 | } 44 | 45 | return this; 46 | } 47 | 48 | public T Collect(Transform parent = null, Vector3? position = null, bool localPosition = true) 49 | { 50 | var obj = Find(x => x.isUsing == false); 51 | if (obj == null && createMoreIfNeeded) 52 | { 53 | obj = CreateObject(parent, position); 54 | Add(obj); 55 | } 56 | 57 | if (obj == null) return obj; 58 | 59 | obj.transform.SetParent(parent ?? mParent); 60 | if (localPosition) 61 | obj.transform.localPosition = position ?? mStartPos; 62 | else 63 | obj.transform.position = position ?? mStartPos; 64 | obj.OnCollect(); 65 | 66 | return obj; 67 | } 68 | 69 | public void Release(T obj) 70 | { 71 | obj.transform.SetParent(mParent); 72 | if(obj != null) 73 | obj.OnRelease(); 74 | } 75 | 76 | public List GetAllWithState(bool active) 77 | { 78 | return FindAll(x => x.isUsing == active); 79 | } 80 | 81 | private T CreateObject(Transform parent = null, Vector3? position = null) 82 | { 83 | var obj = GameObject.Instantiate(referenceObject, position ?? mStartPos, Quaternion.identity, parent ?? mParent).AddComponent(); 84 | obj.transform.localPosition = position ?? mStartPos; 85 | obj.name = obj.objectName + Count; 86 | 87 | if(OnObjectCreationCallBack != null) 88 | OnObjectCreationCallBack.Invoke(obj); 89 | 90 | return obj; 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /Assets/Scripts/Pooling.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f34632602a2e40d8a861fb488dc2450 3 | timeCreated: 1526734907 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/PoolingObject.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace pooling 4 | { 5 | public abstract class PoolingObject : MonoBehaviour, IPooling 6 | { 7 | public virtual string objectName{ get { return ""; } } 8 | public bool isUsing { get; set; } 9 | 10 | public virtual void OnCollect() 11 | { 12 | isUsing = true; 13 | gameObject.SetActive(true); 14 | } 15 | 16 | public virtual void OnRelease() 17 | { 18 | isUsing = false; 19 | gameObject.SetActive(false); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Assets/Scripts/PoolingObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e88262557cbee4913a53e0bf96e79000 3 | timeCreated: 1526734907 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Scripts/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f4fa96691f36409f8771e89084c1d9b 3 | folderAsset: yes 4 | timeCreated: 1526787790 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Scripts/Shaders/PropertyColor.shader: -------------------------------------------------------------------------------- 1 | //code from http://thomasmountainborn.com/2016/05/25/materialpropertyblocks/ 2 | Shader "Custom/PropertyColor" { 3 | Properties { 4 | [PerRendererData]_Color ("Color", Color) = (1,1,1,1) 5 | _MainTex ("Albedo (RGB)", 2D) = "white" {} 6 | _Glossiness ("Smoothness", Range(0,1)) = 0.5 7 | _Metallic ("Metallic", Range(0,1)) = 0.0 8 | } 9 | SubShader { 10 | Tags { "RenderType"="Opaque" } 11 | LOD 200 12 | 13 | CGPROGRAM 14 | // Physically based Standard lighting model, and enable shadows on all light types 15 | #pragma surface surf Standard fullforwardshadows 16 | 17 | // Use shader model 3.0 target, to get nicer looking lighting 18 | #pragma target 3.0 19 | 20 | sampler2D _MainTex; 21 | 22 | struct Input { 23 | float2 uv_MainTex; 24 | }; 25 | 26 | half _Glossiness; 27 | half _Metallic; 28 | fixed4 _Color; 29 | 30 | // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. 31 | // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. 32 | // #pragma instancing_options assumeuniformscaling 33 | UNITY_INSTANCING_CBUFFER_START(Props) 34 | // put more per-instance properties here 35 | UNITY_INSTANCING_CBUFFER_END 36 | 37 | void surf (Input IN, inout SurfaceOutputStandard o) { 38 | // Albedo comes from a texture tinted by color 39 | fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; 40 | o.Albedo = c.rgb; 41 | // Metallic and smoothness come from slider variables 42 | o.Metallic = _Metallic; 43 | o.Smoothness = _Glossiness; 44 | o.Alpha = c.a; 45 | } 46 | ENDCG 47 | } 48 | FallBack "Diffuse" 49 | } 50 | -------------------------------------------------------------------------------- /Assets/Scripts/Shaders/PropertyColor.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7904191d3ebcf4e768261e25cdaf23b1 3 | timeCreated: 1526787803 4 | licenseType: Pro 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Murillo Pugliesi Lopes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /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/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: 3 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_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | m_AutoSyncTransforms: 1 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 5 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 1 10 | m_SpritePackerMode: 4 11 | m_SpritePackerPaddingPower: 1 12 | m_EtcTextureCompressorBehavior: 1 13 | m_EtcTextureFastCompressor: 1 14 | m_EtcTextureNormalCompressor: 2 15 | m_EtcTextureBestCompressor: 4 16 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 17 | m_ProjectGenerationRootNamespace: 18 | m_UserGeneratedProjectSuffix: 19 | m_CollabEditorSettings: 20 | inProgressEnabled: 1 21 | -------------------------------------------------------------------------------- /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: 12 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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /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: 3 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_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /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: 13 7 | productGUID: 1e3305ea178964786abe235c9cb7be4a 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | defaultScreenOrientation: 4 11 | targetDevice: 2 12 | useOnDemandResources: 0 13 | accelerometerFrequency: 60 14 | companyName: DefaultCompany 15 | productName: UnityPooling 16 | defaultCursor: {fileID: 0} 17 | cursorHotspot: {x: 0, y: 0} 18 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 19 | m_ShowUnitySplashScreen: 1 20 | m_ShowUnitySplashLogo: 1 21 | m_SplashScreenOverlayOpacity: 1 22 | m_SplashScreenAnimation: 1 23 | m_SplashScreenLogoStyle: 1 24 | m_SplashScreenDrawMode: 0 25 | m_SplashScreenBackgroundAnimationZoom: 1 26 | m_SplashScreenLogoAnimationZoom: 1 27 | m_SplashScreenBackgroundLandscapeAspect: 1 28 | m_SplashScreenBackgroundPortraitAspect: 1 29 | m_SplashScreenBackgroundLandscapeUvs: 30 | serializedVersion: 2 31 | x: 0 32 | y: 0 33 | width: 1 34 | height: 1 35 | m_SplashScreenBackgroundPortraitUvs: 36 | serializedVersion: 2 37 | x: 0 38 | y: 0 39 | width: 1 40 | height: 1 41 | m_SplashScreenLogos: [] 42 | m_VirtualRealitySplashScreen: {fileID: 0} 43 | m_HolographicTrackingLossScreen: {fileID: 0} 44 | defaultScreenWidth: 1024 45 | defaultScreenHeight: 768 46 | defaultScreenWidthWeb: 960 47 | defaultScreenHeightWeb: 600 48 | m_StereoRenderingPath: 0 49 | m_ActiveColorSpace: 0 50 | m_MTRendering: 1 51 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 52 | iosShowActivityIndicatorOnLoading: -1 53 | androidShowActivityIndicatorOnLoading: -1 54 | tizenShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | disableDepthAndStencilBuffers: 0 65 | androidBlitType: 0 66 | defaultIsFullScreen: 1 67 | defaultIsNativeResolution: 1 68 | macRetinaSupport: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | submitAnalytics: 1 75 | usePlayerLog: 1 76 | bakeCollisionMeshes: 0 77 | forceSingleInstance: 0 78 | resizableWindow: 0 79 | useMacAppStoreValidation: 0 80 | macAppStoreCategory: public.app-category.games 81 | gpuSkinning: 0 82 | graphicsJobs: 0 83 | xboxPIXTextureCapture: 0 84 | xboxEnableAvatar: 0 85 | xboxEnableKinect: 0 86 | xboxEnableKinectAutoTracking: 0 87 | xboxEnableFitness: 0 88 | visibleInBackground: 1 89 | allowFullscreenSwitch: 1 90 | graphicsJobMode: 0 91 | macFullscreenMode: 2 92 | d3d9FullscreenMode: 1 93 | d3d11FullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | metalFramebufferOnly: 0 99 | n3dsDisableStereoscopicView: 0 100 | n3dsEnableSharedListOpt: 1 101 | n3dsEnableVSync: 0 102 | ignoreAlphaClear: 0 103 | xboxOneResolution: 0 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | videoMemoryForVertexBuffers: 0 109 | psp2PowerMode: 0 110 | psp2AcquireBGM: 1 111 | wiiUTVResolution: 0 112 | wiiUGamePadMSAA: 1 113 | wiiUSupportsNunchuk: 0 114 | wiiUSupportsClassicController: 0 115 | wiiUSupportsBalanceBoard: 0 116 | wiiUSupportsMotionPlus: 0 117 | wiiUSupportsProController: 0 118 | wiiUAllowScreenCapture: 1 119 | wiiUControllerCount: 0 120 | m_SupportedAspectRatios: 121 | 4:3: 1 122 | 5:4: 1 123 | 16:10: 1 124 | 16:9: 1 125 | Others: 1 126 | bundleVersion: 1.0 127 | preloadedAssets: [] 128 | metroInputSource: 0 129 | m_HolographicPauseOnTrackingLoss: 1 130 | xboxOneDisableKinectGpuReservation: 0 131 | xboxOneEnable7thCore: 0 132 | vrSettings: 133 | cardboard: 134 | depthFormat: 0 135 | enableTransitionView: 0 136 | daydream: 137 | depthFormat: 0 138 | useSustainedPerformanceMode: 0 139 | enableVideoLayer: 0 140 | useProtectedVideoMemory: 0 141 | hololens: 142 | depthFormat: 1 143 | protectGraphicsMemory: 0 144 | useHDRDisplay: 0 145 | m_ColorGamuts: 00000000 146 | targetPixelDensity: 0 147 | resolutionScalingMode: 0 148 | androidSupportedAspectRatio: 1 149 | androidMaxAspectRatio: 2.1 150 | applicationIdentifier: {} 151 | buildNumber: {} 152 | AndroidBundleVersionCode: 1 153 | AndroidMinSdkVersion: 16 154 | AndroidTargetSdkVersion: 0 155 | AndroidPreferredInstallLocation: 1 156 | aotOptions: 157 | stripEngineCode: 1 158 | iPhoneStrippingLevel: 0 159 | iPhoneScriptCallOptimization: 0 160 | ForceInternetPermission: 0 161 | ForceSDCardPermission: 0 162 | CreateWallpaper: 0 163 | APKExpansionFiles: 0 164 | keepLoadedShadersAlive: 0 165 | StripUnusedMeshComponents: 0 166 | VertexChannelCompressionMask: 167 | serializedVersion: 2 168 | m_Bits: 238 169 | iPhoneSdkVersion: 988 170 | iOSTargetOSVersionString: 7.0 171 | tvOSSdkVersion: 0 172 | tvOSRequireExtendedGameController: 0 173 | tvOSTargetOSVersionString: 9.0 174 | uIPrerenderedIcon: 0 175 | uIRequiresPersistentWiFi: 0 176 | uIRequiresFullScreen: 1 177 | uIStatusBarHidden: 1 178 | uIExitOnSuspend: 0 179 | uIStatusBarStyle: 0 180 | iPhoneSplashScreen: {fileID: 0} 181 | iPhoneHighResSplashScreen: {fileID: 0} 182 | iPhoneTallHighResSplashScreen: {fileID: 0} 183 | iPhone47inSplashScreen: {fileID: 0} 184 | iPhone55inPortraitSplashScreen: {fileID: 0} 185 | iPhone55inLandscapeSplashScreen: {fileID: 0} 186 | iPadPortraitSplashScreen: {fileID: 0} 187 | iPadHighResPortraitSplashScreen: {fileID: 0} 188 | iPadLandscapeSplashScreen: {fileID: 0} 189 | iPadHighResLandscapeSplashScreen: {fileID: 0} 190 | appleTVSplashScreen: {fileID: 0} 191 | tvOSSmallIconLayers: [] 192 | tvOSLargeIconLayers: [] 193 | tvOSTopShelfImageLayers: [] 194 | tvOSTopShelfImageWideLayers: [] 195 | iOSLaunchScreenType: 0 196 | iOSLaunchScreenPortrait: {fileID: 0} 197 | iOSLaunchScreenLandscape: {fileID: 0} 198 | iOSLaunchScreenBackgroundColor: 199 | serializedVersion: 2 200 | rgba: 0 201 | iOSLaunchScreenFillPct: 100 202 | iOSLaunchScreenSize: 100 203 | iOSLaunchScreenCustomXibPath: 204 | iOSLaunchScreeniPadType: 0 205 | iOSLaunchScreeniPadImage: {fileID: 0} 206 | iOSLaunchScreeniPadBackgroundColor: 207 | serializedVersion: 2 208 | rgba: 0 209 | iOSLaunchScreeniPadFillPct: 100 210 | iOSLaunchScreeniPadSize: 100 211 | iOSLaunchScreeniPadCustomXibPath: 212 | iOSDeviceRequirements: [] 213 | iOSURLSchemes: [] 214 | iOSBackgroundModes: 0 215 | iOSMetalForceHardShadows: 0 216 | metalEditorSupport: 0 217 | metalAPIValidation: 1 218 | iOSRenderExtraFrameOnPause: 0 219 | appleDeveloperTeamID: 220 | iOSManualSigningProvisioningProfileID: 221 | tvOSManualSigningProvisioningProfileID: 222 | appleEnableAutomaticSigning: 0 223 | AndroidTargetDevice: 0 224 | AndroidSplashScreenScale: 0 225 | androidSplashScreen: {fileID: 0} 226 | AndroidKeystoreName: 227 | AndroidKeyaliasName: 228 | AndroidTVCompatibility: 1 229 | AndroidIsGame: 1 230 | AndroidEnableTango: 0 231 | androidEnableBanner: 1 232 | androidUseLowAccuracyLocation: 0 233 | m_AndroidBanners: 234 | - width: 320 235 | height: 180 236 | banner: {fileID: 0} 237 | androidGamepadSupportLevel: 0 238 | resolutionDialogBanner: {fileID: 0} 239 | m_BuildTargetIcons: [] 240 | m_BuildTargetBatching: [] 241 | m_BuildTargetGraphicsAPIs: [] 242 | m_BuildTargetVRSettings: [] 243 | m_BuildTargetEnableVuforiaSettings: [] 244 | openGLRequireES31: 0 245 | openGLRequireES31AEP: 0 246 | m_TemplateCustomTags: {} 247 | mobileMTRendering: 248 | Android: 1 249 | iPhone: 1 250 | tvOS: 1 251 | wiiUTitleID: 0005000011000000 252 | wiiUGroupID: 00010000 253 | wiiUCommonSaveSize: 4096 254 | wiiUAccountSaveSize: 2048 255 | wiiUOlvAccessKey: 0 256 | wiiUTinCode: 0 257 | wiiUJoinGameId: 0 258 | wiiUJoinGameModeMask: 0000000000000000 259 | wiiUCommonBossSize: 0 260 | wiiUAccountBossSize: 0 261 | wiiUAddOnUniqueIDs: [] 262 | wiiUMainThreadStackSize: 3072 263 | wiiULoaderThreadStackSize: 1024 264 | wiiUSystemHeapSize: 128 265 | wiiUTVStartupScreen: {fileID: 0} 266 | wiiUGamePadStartupScreen: {fileID: 0} 267 | wiiUDrcBufferDisabled: 0 268 | wiiUProfilerLibPath: 269 | playModeTestRunnerEnabled: 0 270 | actionOnDotNetUnhandledException: 1 271 | enableInternalProfiler: 0 272 | logObjCUncaughtExceptions: 1 273 | enableCrashReportAPI: 0 274 | cameraUsageDescription: 275 | locationUsageDescription: 276 | microphoneUsageDescription: 277 | switchNetLibKey: 278 | switchSocketMemoryPoolSize: 6144 279 | switchSocketAllocatorPoolSize: 128 280 | switchSocketConcurrencyLimit: 14 281 | switchScreenResolutionBehavior: 2 282 | switchUseCPUProfiler: 0 283 | switchApplicationID: 0x01004b9000490000 284 | switchNSODependencies: 285 | switchTitleNames_0: 286 | switchTitleNames_1: 287 | switchTitleNames_2: 288 | switchTitleNames_3: 289 | switchTitleNames_4: 290 | switchTitleNames_5: 291 | switchTitleNames_6: 292 | switchTitleNames_7: 293 | switchTitleNames_8: 294 | switchTitleNames_9: 295 | switchTitleNames_10: 296 | switchTitleNames_11: 297 | switchPublisherNames_0: 298 | switchPublisherNames_1: 299 | switchPublisherNames_2: 300 | switchPublisherNames_3: 301 | switchPublisherNames_4: 302 | switchPublisherNames_5: 303 | switchPublisherNames_6: 304 | switchPublisherNames_7: 305 | switchPublisherNames_8: 306 | switchPublisherNames_9: 307 | switchPublisherNames_10: 308 | switchPublisherNames_11: 309 | switchIcons_0: {fileID: 0} 310 | switchIcons_1: {fileID: 0} 311 | switchIcons_2: {fileID: 0} 312 | switchIcons_3: {fileID: 0} 313 | switchIcons_4: {fileID: 0} 314 | switchIcons_5: {fileID: 0} 315 | switchIcons_6: {fileID: 0} 316 | switchIcons_7: {fileID: 0} 317 | switchIcons_8: {fileID: 0} 318 | switchIcons_9: {fileID: 0} 319 | switchIcons_10: {fileID: 0} 320 | switchIcons_11: {fileID: 0} 321 | switchSmallIcons_0: {fileID: 0} 322 | switchSmallIcons_1: {fileID: 0} 323 | switchSmallIcons_2: {fileID: 0} 324 | switchSmallIcons_3: {fileID: 0} 325 | switchSmallIcons_4: {fileID: 0} 326 | switchSmallIcons_5: {fileID: 0} 327 | switchSmallIcons_6: {fileID: 0} 328 | switchSmallIcons_7: {fileID: 0} 329 | switchSmallIcons_8: {fileID: 0} 330 | switchSmallIcons_9: {fileID: 0} 331 | switchSmallIcons_10: {fileID: 0} 332 | switchSmallIcons_11: {fileID: 0} 333 | switchManualHTML: 334 | switchAccessibleURLs: 335 | switchLegalInformation: 336 | switchMainThreadStackSize: 1048576 337 | switchPresenceGroupId: 338 | switchLogoHandling: 0 339 | switchReleaseVersion: 0 340 | switchDisplayVersion: 1.0.0 341 | switchStartupUserAccount: 0 342 | switchTouchScreenUsage: 0 343 | switchSupportedLanguagesMask: 0 344 | switchLogoType: 0 345 | switchApplicationErrorCodeCategory: 346 | switchUserAccountSaveDataSize: 0 347 | switchUserAccountSaveDataJournalSize: 0 348 | switchApplicationAttribute: 0 349 | switchCardSpecSize: -1 350 | switchCardSpecClock: -1 351 | switchRatingsMask: 0 352 | switchRatingsInt_0: 0 353 | switchRatingsInt_1: 0 354 | switchRatingsInt_2: 0 355 | switchRatingsInt_3: 0 356 | switchRatingsInt_4: 0 357 | switchRatingsInt_5: 0 358 | switchRatingsInt_6: 0 359 | switchRatingsInt_7: 0 360 | switchRatingsInt_8: 0 361 | switchRatingsInt_9: 0 362 | switchRatingsInt_10: 0 363 | switchRatingsInt_11: 0 364 | switchLocalCommunicationIds_0: 365 | switchLocalCommunicationIds_1: 366 | switchLocalCommunicationIds_2: 367 | switchLocalCommunicationIds_3: 368 | switchLocalCommunicationIds_4: 369 | switchLocalCommunicationIds_5: 370 | switchLocalCommunicationIds_6: 371 | switchLocalCommunicationIds_7: 372 | switchParentalControl: 0 373 | switchAllowsScreenshot: 1 374 | switchDataLossConfirmation: 0 375 | switchSupportedNpadStyles: 3 376 | switchSocketConfigEnabled: 0 377 | switchTcpInitialSendBufferSize: 32 378 | switchTcpInitialReceiveBufferSize: 64 379 | switchTcpAutoSendBufferSizeMax: 256 380 | switchTcpAutoReceiveBufferSizeMax: 256 381 | switchUdpSendBufferSize: 9 382 | switchUdpReceiveBufferSize: 42 383 | switchSocketBufferEfficiency: 4 384 | switchSocketInitializeEnabled: 1 385 | switchNetworkInterfaceManagerInitializeEnabled: 1 386 | switchPlayerConnectionEnabled: 1 387 | ps4NPAgeRating: 12 388 | ps4NPTitleSecret: 389 | ps4NPTrophyPackPath: 390 | ps4ParentalLevel: 11 391 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 392 | ps4Category: 0 393 | ps4MasterVersion: 01.00 394 | ps4AppVersion: 01.00 395 | ps4AppType: 0 396 | ps4ParamSfxPath: 397 | ps4VideoOutPixelFormat: 0 398 | ps4VideoOutInitialWidth: 1920 399 | ps4VideoOutBaseModeInitialWidth: 1920 400 | ps4VideoOutReprojectionRate: 60 401 | ps4PronunciationXMLPath: 402 | ps4PronunciationSIGPath: 403 | ps4BackgroundImagePath: 404 | ps4StartupImagePath: 405 | ps4SaveDataImagePath: 406 | ps4SdkOverride: 407 | ps4BGMPath: 408 | ps4ShareFilePath: 409 | ps4ShareOverlayImagePath: 410 | ps4PrivacyGuardImagePath: 411 | ps4NPtitleDatPath: 412 | ps4RemotePlayKeyAssignment: -1 413 | ps4RemotePlayKeyMappingDir: 414 | ps4PlayTogetherPlayerCount: 0 415 | ps4EnterButtonAssignment: 1 416 | ps4ApplicationParam1: 0 417 | ps4ApplicationParam2: 0 418 | ps4ApplicationParam3: 0 419 | ps4ApplicationParam4: 0 420 | ps4DownloadDataSize: 0 421 | ps4GarlicHeapSize: 2048 422 | ps4ProGarlicHeapSize: 2560 423 | ps4Passcode: nsQzldVI5ZuGXbEWRK5RhRXdCdG5nG5a 424 | ps4pnSessions: 1 425 | ps4pnPresence: 1 426 | ps4pnFriends: 1 427 | ps4pnGameCustomData: 1 428 | playerPrefsSupport: 0 429 | restrictedAudioUsageRights: 0 430 | ps4UseResolutionFallback: 0 431 | ps4ReprojectionSupport: 0 432 | ps4UseAudio3dBackend: 0 433 | ps4SocialScreenEnabled: 0 434 | ps4ScriptOptimizationLevel: 0 435 | ps4Audio3dVirtualSpeakerCount: 14 436 | ps4attribCpuUsage: 0 437 | ps4PatchPkgPath: 438 | ps4PatchLatestPkgPath: 439 | ps4PatchChangeinfoPath: 440 | ps4PatchDayOne: 0 441 | ps4attribUserManagement: 0 442 | ps4attribMoveSupport: 0 443 | ps4attrib3DSupport: 0 444 | ps4attribShareSupport: 0 445 | ps4attribExclusiveVR: 0 446 | ps4disableAutoHideSplash: 0 447 | ps4videoRecordingFeaturesUsed: 0 448 | ps4contentSearchFeaturesUsed: 0 449 | ps4attribEyeToEyeDistanceSettingVR: 0 450 | ps4IncludedModules: [] 451 | monoEnv: 452 | psp2Splashimage: {fileID: 0} 453 | psp2NPTrophyPackPath: 454 | psp2NPSupportGBMorGJP: 0 455 | psp2NPAgeRating: 12 456 | psp2NPTitleDatPath: 457 | psp2NPCommsID: 458 | psp2NPCommunicationsID: 459 | psp2NPCommsPassphrase: 460 | psp2NPCommsSig: 461 | psp2ParamSfxPath: 462 | psp2ManualPath: 463 | psp2LiveAreaGatePath: 464 | psp2LiveAreaBackroundPath: 465 | psp2LiveAreaPath: 466 | psp2LiveAreaTrialPath: 467 | psp2PatchChangeInfoPath: 468 | psp2PatchOriginalPackage: 469 | psp2PackagePassword: zdNMK66MuCV6GXi5xr84P2R391UXaLHb 470 | psp2KeystoneFile: 471 | psp2MemoryExpansionMode: 0 472 | psp2DRMType: 0 473 | psp2StorageType: 0 474 | psp2MediaCapacity: 0 475 | psp2DLCConfigPath: 476 | psp2ThumbnailPath: 477 | psp2BackgroundPath: 478 | psp2SoundPath: 479 | psp2TrophyCommId: 480 | psp2TrophyPackagePath: 481 | psp2PackagedResourcesPath: 482 | psp2SaveDataQuota: 10240 483 | psp2ParentalLevel: 1 484 | psp2ShortTitle: Not Set 485 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 486 | psp2Category: 0 487 | psp2MasterVersion: 01.00 488 | psp2AppVersion: 01.00 489 | psp2TVBootMode: 0 490 | psp2EnterButtonAssignment: 2 491 | psp2TVDisableEmu: 0 492 | psp2AllowTwitterDialog: 1 493 | psp2Upgradable: 0 494 | psp2HealthWarning: 0 495 | psp2UseLibLocation: 0 496 | psp2InfoBarOnStartup: 0 497 | psp2InfoBarColor: 0 498 | psp2ScriptOptimizationLevel: 0 499 | psmSplashimage: {fileID: 0} 500 | splashScreenBackgroundSourceLandscape: {fileID: 0} 501 | splashScreenBackgroundSourcePortrait: {fileID: 0} 502 | spritePackerPolicy: 503 | webGLMemorySize: 256 504 | webGLExceptionSupport: 1 505 | webGLNameFilesAsHashes: 0 506 | webGLDataCaching: 0 507 | webGLDebugSymbols: 0 508 | webGLEmscriptenArgs: 509 | webGLModulesDirectory: 510 | webGLTemplate: APPLICATION:Default 511 | webGLAnalyzeBuildSize: 0 512 | webGLUseEmbeddedResources: 0 513 | webGLUseWasm: 0 514 | webGLCompressionFormat: 1 515 | scriptingDefineSymbols: {} 516 | platformArchitecture: {} 517 | scriptingBackend: {} 518 | incrementalIl2cppBuild: {} 519 | additionalIl2CppArgs: 520 | scriptingRuntimeVersion: 0 521 | apiCompatibilityLevelPerPlatform: {} 522 | m_RenderingPath: 1 523 | m_MobileRenderingPath: 1 524 | metroPackageName: UnityPooling 525 | metroPackageVersion: 526 | metroCertificatePath: 527 | metroCertificatePassword: 528 | metroCertificateSubject: 529 | metroCertificateIssuer: 530 | metroCertificateNotAfter: 0000000000000000 531 | metroApplicationDescription: UnityPooling 532 | wsaImages: {} 533 | metroTileShortName: 534 | metroCommandLineArgsFile: 535 | metroTileShowName: 0 536 | metroMediumTileShowName: 0 537 | metroLargeTileShowName: 0 538 | metroWideTileShowName: 0 539 | metroDefaultTileSize: 1 540 | metroTileForegroundText: 2 541 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 542 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 543 | a: 1} 544 | metroSplashScreenUseBackgroundColor: 0 545 | platformCapabilities: {} 546 | metroFTAName: 547 | metroFTAFileTypes: [] 548 | metroProtocolName: 549 | metroCompilationOverrides: 1 550 | tizenProductDescription: 551 | tizenProductURL: 552 | tizenSigningProfileName: 553 | tizenGPSPermissions: 0 554 | tizenMicrophonePermissions: 0 555 | tizenDeploymentTarget: 556 | tizenDeploymentTargetType: -1 557 | tizenMinOSVersion: 1 558 | n3dsUseExtSaveData: 0 559 | n3dsCompressStaticMem: 1 560 | n3dsExtSaveDataNumber: 0x12345 561 | n3dsStackSize: 131072 562 | n3dsTargetPlatform: 2 563 | n3dsRegion: 7 564 | n3dsMediaSize: 0 565 | n3dsLogoStyle: 3 566 | n3dsTitle: GameName 567 | n3dsProductCode: 568 | n3dsApplicationId: 0xFF3FF 569 | stvDeviceAddress: 570 | stvProductDescription: 571 | stvProductAuthor: 572 | stvProductAuthorEmail: 573 | stvProductLink: 574 | stvProductCategory: 0 575 | XboxOneProductId: 576 | XboxOneUpdateKey: 577 | XboxOneSandboxId: 578 | XboxOneContentId: 579 | XboxOneTitleId: 580 | XboxOneSCId: 581 | XboxOneGameOsOverridePath: 582 | XboxOnePackagingOverridePath: 583 | XboxOneAppManifestOverridePath: 584 | XboxOnePackageEncryption: 0 585 | XboxOnePackageUpdateGranularity: 2 586 | XboxOneDescription: 587 | XboxOneLanguage: 588 | - enus 589 | XboxOneCapability: [] 590 | XboxOneGameRating: {} 591 | XboxOneIsContentPackage: 0 592 | XboxOneEnableGPUVariability: 0 593 | XboxOneSockets: {} 594 | XboxOneSplashScreen: {fileID: 0} 595 | XboxOneAllowedProductIds: [] 596 | XboxOnePersistentLocalStorageSize: 0 597 | xboxOneScriptCompiler: 0 598 | vrEditorSettings: 599 | daydream: 600 | daydreamIconForeground: {fileID: 0} 601 | daydreamIconBackground: {fileID: 0} 602 | cloudServicesEnabled: {} 603 | facebookSdkVersion: 7.9.4 604 | apiCompatibilityLevel: 2 605 | cloudProjectId: 606 | projectName: 607 | organizationId: 608 | cloudEnabled: 0 609 | enableNativePlatformBackendsForNewInputSystem: 0 610 | disableOldInputManagerSupport: 0 611 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.2.0f3 2 | -------------------------------------------------------------------------------- /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 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 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: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Samsung TV: 2 185 | Standalone: 5 186 | Tizen: 2 187 | WebGL: 3 188 | WiiU: 5 189 | Windows Store Apps: 5 190 | XboxOne: 5 191 | iPhone: 2 192 | tvOS: 2 193 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityPooling 2 | An optimized approach object pooling. 3 | 4 |

5 | Example 6 |

7 | 8 | ## How to use 9 | *you can find a pratical example inside this repository in PoolingScene scene* 10 | 11 | ### 1 - Create a class that extends `PoolingObject` and, if you wish, implement its virtual members (`OnRelease` and `OnCollect`) 12 | ```c# 13 | public class ObjectExample : PoolingObject { 14 | private Renderer mRenderer; 15 | private MaterialPropertyBlock mPropBlock; 16 | 17 | void Awake() 18 | { 19 | mPropBlock = new MaterialPropertyBlock(); 20 | mRenderer = GetComponent(); 21 | } 22 | 23 | public override void OnCollect() 24 | { 25 | mRenderer.GetPropertyBlock(mPropBlock); 26 | mPropBlock.SetColor("_Color", Random.ColorHSV()); 27 | mRenderer.SetPropertyBlock(mPropBlock); 28 | 29 | Invoke("OnRelease", 2f); 30 | 31 | base.OnCollect(); 32 | } 33 | } 34 | ``` 35 | ### 2 - Create a class to initiate the Pooling and call `Collect` whenever you need an instance of T 36 | ```c# 37 | public class PoolingExample : MonoBehaviour { 38 | public GameObject referenceObject; 39 | 40 | private Pooling mPooling = new Pooling(); 41 | 42 | void Start () { 43 | mPooling.Initialize(10, referenceObject, transform); 44 | } 45 | 46 | void Update () { 47 | if(Input.GetKeyDown(KeyCode.Space)) 48 | { 49 | var o = mPooling.Collect(); 50 | o.transform.position = new Vector3(Random.Range(-13f, 13f), Random.Range(-6.5f, 6.5f), 2.66f); 51 | } 52 | } 53 | } 54 | ``` 55 | 56 | ## Pooling< T > `public` overview 57 | ### Properties 58 | |name |type |description | 59 | |--|--|--| 60 | |`createMoreIfNeeded` |**bool** |*boolean to control if the system can create more objects if needed. Its true by default.* | 61 | |`OnObjectCreationCallBack` |**delegate ObjectCreationCallback** |*callback triggered whenever a new object is created, send T as parameter* | 62 | 63 | ### Methods 64 | 65 |
66 | 67 | > `pooling.Initialize` 68 | - *Description*: Initiate the pooling, creating `amount` `objReference` and attaching `T` to the object. 69 | 70 | - *Parameters*: 71 | 72 | |name |type |description | 73 | |--|--|--| 74 | |`amount` |**int** |*initial amount to be created.* | 75 | |`refObject` |**GameObject** |*a reference of the object that will be instantiated and handled by the pool.* | 76 | |`parent` |**Transform** |*the parent of the instantiated object. set `null` if creating in root.* | 77 | |`worldPos` |**Vector3** |*the initial position for instantiated object.* | 78 | |`startState` |**int** |*the initial state for instantiated object, if true, it will call OnCollect when instantiating each object, if false, OnRelease* | 79 | 80 |
81 | 82 | > `pooling.Collect` 83 | - *Description*: 84 | Returns an instance of `T` object that is not currently being used. 85 | 86 | - *Parameters* : 87 | 88 | |name |type |description | 89 | |--|--|--| 90 | |`parent` |**Transform** |*if you need to change the parent of the object, do it here.* | 91 | |`position` |**Vector3** |*position of the object* | 92 | |`localPosition` |**bool** |*if true, `position` will be int local space, else, it will be world space.* | 93 | 94 |
95 | 96 | > `dynamicScroll.Release` 97 | - *Description*: Releases the object. 98 | 99 | - *Parameters* : 100 | 101 | |name |type |description | 102 | |--|--|--| 103 | |`obj` |**T** |*Releases the object.* | 104 | 105 |
106 | 107 | > `dynamicScroll.GetAllWithState` 108 | - *Description*: Returns a list with objects either being used or not being used. 109 | 110 | - *Parameters* : 111 | 112 | |name |type |description | 113 | |--|--|--| 114 | |`active` |**bool** |*if true, return a `List` of actived objects, else, unused objects.* | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /UnityPackageManager/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /readmeassets/pooling_example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mukarillo/UnityPooling/28df354dbad58659891d4b5fcda1b54a1bf11bb2/readmeassets/pooling_example.gif --------------------------------------------------------------------------------