├── Assets ├── Materials.meta ├── Materials │ ├── Line color.mat │ └── Line color.mat.meta ├── Scenes.meta ├── Scenes │ ├── Main.unity │ └── Main.unity.meta ├── Scripts.meta ├── Scripts │ ├── GameManager.cs │ ├── GameManager.cs.meta │ ├── Triangulator.cs │ └── Triangulator.cs.meta ├── Sprites.meta ├── Sprites │ ├── box.png │ └── box.png.meta └── shader drawing GIF.gif ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0edbd96f62cafa4587dc9de13f7b554 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Line color.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: Line color 10 | m_Shader: {fileID: 10101, guid: 0000000000000000e000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 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 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: 0.9843137, g: 0.77254903, b: 0.19215687, a: 1} 76 | - _EmissionColor: {r: 0.7607843, g: 0.7607843, b: 0.7607843, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/Line color.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38812932a8d933d43921e9b4604b87d8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 131a6b21c8605f84396be9f6751fb6e3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Main.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: 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 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_TemporalCoherenceThreshold: 1 54 | m_EnvironmentLightingMode: 0 55 | m_EnableBakedLightmaps: 0 56 | m_EnableRealtimeLightmaps: 0 57 | m_LightmapEditorSettings: 58 | serializedVersion: 10 59 | m_Resolution: 2 60 | m_BakeResolution: 40 61 | m_AtlasSize: 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_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &215174421 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 215174422} 124 | - component: {fileID: 215174423} 125 | - component: {fileID: 215174424} 126 | m_Layer: 0 127 | m_Name: Game manager 128 | m_TagString: Untagged 129 | m_Icon: {fileID: 0} 130 | m_NavMeshLayer: 0 131 | m_StaticEditorFlags: 0 132 | m_IsActive: 1 133 | --- !u!4 &215174422 134 | Transform: 135 | m_ObjectHideFlags: 0 136 | m_PrefabParentObject: {fileID: 0} 137 | m_PrefabInternal: {fileID: 0} 138 | m_GameObject: {fileID: 215174421} 139 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 140 | m_LocalPosition: {x: 0, y: 0, z: 0} 141 | m_LocalScale: {x: 1, y: 1, z: 1} 142 | m_Children: [] 143 | m_Father: {fileID: 0} 144 | m_RootOrder: 1 145 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 146 | --- !u!114 &215174423 147 | MonoBehaviour: 148 | m_ObjectHideFlags: 0 149 | m_PrefabParentObject: {fileID: 0} 150 | m_PrefabInternal: {fileID: 0} 151 | m_GameObject: {fileID: 215174421} 152 | m_Enabled: 1 153 | m_EditorHideFlags: 0 154 | m_Script: {fileID: 11500000, guid: 12d596d1217351f45880fc082708c8e3, type: 3} 155 | m_Name: 156 | m_EditorClassIdentifier: 157 | colorPicker: 158 | - '#4CD137' 159 | - '#EE5253' 160 | - '#FBC531' 161 | - '#9B59B6' 162 | - '#22A6B3' 163 | continousTracking: 0 164 | text: {fileID: 779167653} 165 | lineColor: {fileID: 2100000, guid: 38812932a8d933d43921e9b4604b87d8, type: 2} 166 | --- !u!120 &215174424 167 | LineRenderer: 168 | m_ObjectHideFlags: 0 169 | m_PrefabParentObject: {fileID: 0} 170 | m_PrefabInternal: {fileID: 0} 171 | m_GameObject: {fileID: 215174421} 172 | m_Enabled: 1 173 | m_CastShadows: 0 174 | m_ReceiveShadows: 0 175 | m_DynamicOccludee: 1 176 | m_MotionVectors: 0 177 | m_LightProbeUsage: 0 178 | m_ReflectionProbeUsage: 0 179 | m_RenderingLayerMask: 4294967295 180 | m_Materials: 181 | - {fileID: 2100000, guid: 38812932a8d933d43921e9b4604b87d8, type: 2} 182 | m_StaticBatchInfo: 183 | firstSubMesh: 0 184 | subMeshCount: 0 185 | m_StaticBatchRoot: {fileID: 0} 186 | m_ProbeAnchor: {fileID: 0} 187 | m_LightProbeVolumeOverride: {fileID: 0} 188 | m_ScaleInLightmap: 1 189 | m_PreserveUVs: 0 190 | m_IgnoreNormalsForChartDetection: 0 191 | m_ImportantGI: 0 192 | m_StitchLightmapSeams: 0 193 | m_SelectedEditorRenderState: 3 194 | m_MinimumChartSize: 4 195 | m_AutoUVMaxDistance: 0.5 196 | m_AutoUVMaxAngle: 89 197 | m_LightmapParameters: {fileID: 0} 198 | m_SortingLayerID: 0 199 | m_SortingLayer: 0 200 | m_SortingOrder: 0 201 | m_Positions: [] 202 | m_Parameters: 203 | serializedVersion: 2 204 | widthMultiplier: 0.025 205 | widthCurve: 206 | serializedVersion: 2 207 | m_Curve: 208 | - serializedVersion: 3 209 | time: 0 210 | value: 1 211 | inSlope: 0 212 | outSlope: 0 213 | tangentMode: 0 214 | weightedMode: 0 215 | inWeight: 0.33333334 216 | outWeight: 0.33333334 217 | m_PreInfinity: 2 218 | m_PostInfinity: 2 219 | m_RotationOrder: 4 220 | colorGradient: 221 | serializedVersion: 2 222 | key0: {r: 1, g: 1, b: 1, a: 1} 223 | key1: {r: 1, g: 1, b: 1, a: 1} 224 | key2: {r: 0, g: 0, b: 0, a: 0} 225 | key3: {r: 0, g: 0, b: 0, a: 0} 226 | key4: {r: 0, g: 0, b: 0, a: 0} 227 | key5: {r: 0, g: 0, b: 0, a: 0} 228 | key6: {r: 0, g: 0, b: 0, a: 0} 229 | key7: {r: 0, g: 0, b: 0, a: 0} 230 | ctime0: 0 231 | ctime1: 65535 232 | ctime2: 0 233 | ctime3: 0 234 | ctime4: 0 235 | ctime5: 0 236 | ctime6: 0 237 | ctime7: 0 238 | atime0: 0 239 | atime1: 65535 240 | atime2: 0 241 | atime3: 0 242 | atime4: 0 243 | atime5: 0 244 | atime6: 0 245 | atime7: 0 246 | m_Mode: 0 247 | m_NumColorKeys: 2 248 | m_NumAlphaKeys: 2 249 | numCornerVertices: 0 250 | numCapVertices: 0 251 | alignment: 0 252 | textureMode: 0 253 | generateLightingData: 0 254 | m_UseWorldSpace: 1 255 | m_Loop: 0 256 | --- !u!1 &325066834 257 | GameObject: 258 | m_ObjectHideFlags: 0 259 | m_PrefabParentObject: {fileID: 0} 260 | m_PrefabInternal: {fileID: 0} 261 | serializedVersion: 5 262 | m_Component: 263 | - component: {fileID: 325066835} 264 | - component: {fileID: 325066838} 265 | - component: {fileID: 325066837} 266 | - component: {fileID: 325066836} 267 | m_Layer: 5 268 | m_Name: Button 269 | m_TagString: Untagged 270 | m_Icon: {fileID: 0} 271 | m_NavMeshLayer: 0 272 | m_StaticEditorFlags: 0 273 | m_IsActive: 1 274 | --- !u!224 &325066835 275 | RectTransform: 276 | m_ObjectHideFlags: 0 277 | m_PrefabParentObject: {fileID: 0} 278 | m_PrefabInternal: {fileID: 0} 279 | m_GameObject: {fileID: 325066834} 280 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 281 | m_LocalPosition: {x: 0, y: 0, z: 0} 282 | m_LocalScale: {x: 1, y: 1, z: 1} 283 | m_Children: 284 | - {fileID: 779167652} 285 | m_Father: {fileID: 1121390150} 286 | m_RootOrder: 0 287 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 288 | m_AnchorMin: {x: 1, y: 1} 289 | m_AnchorMax: {x: 1, y: 1} 290 | m_AnchoredPosition: {x: -80, y: -15} 291 | m_SizeDelta: {x: 160, y: 30} 292 | m_Pivot: {x: 0.5, y: 0.5} 293 | --- !u!114 &325066836 294 | MonoBehaviour: 295 | m_ObjectHideFlags: 0 296 | m_PrefabParentObject: {fileID: 0} 297 | m_PrefabInternal: {fileID: 0} 298 | m_GameObject: {fileID: 325066834} 299 | m_Enabled: 1 300 | m_EditorHideFlags: 0 301 | m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} 302 | m_Name: 303 | m_EditorClassIdentifier: 304 | m_Navigation: 305 | m_Mode: 3 306 | m_SelectOnUp: {fileID: 0} 307 | m_SelectOnDown: {fileID: 0} 308 | m_SelectOnLeft: {fileID: 0} 309 | m_SelectOnRight: {fileID: 0} 310 | m_Transition: 1 311 | m_Colors: 312 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 313 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 314 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 315 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 316 | m_ColorMultiplier: 1 317 | m_FadeDuration: 0.1 318 | m_SpriteState: 319 | m_HighlightedSprite: {fileID: 0} 320 | m_PressedSprite: {fileID: 0} 321 | m_DisabledSprite: {fileID: 0} 322 | m_AnimationTriggers: 323 | m_NormalTrigger: Normal 324 | m_HighlightedTrigger: Highlighted 325 | m_PressedTrigger: Pressed 326 | m_DisabledTrigger: Disabled 327 | m_Interactable: 1 328 | m_TargetGraphic: {fileID: 325066837} 329 | m_OnClick: 330 | m_PersistentCalls: 331 | m_Calls: 332 | - m_Target: {fileID: 215174423} 333 | m_MethodName: ContiniousTracking 334 | m_Mode: 1 335 | m_Arguments: 336 | m_ObjectArgument: {fileID: 0} 337 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 338 | m_IntArgument: 0 339 | m_FloatArgument: 0 340 | m_StringArgument: 341 | m_BoolArgument: 0 342 | m_CallState: 2 343 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 344 | Culture=neutral, PublicKeyToken=null 345 | --- !u!114 &325066837 346 | MonoBehaviour: 347 | m_ObjectHideFlags: 0 348 | m_PrefabParentObject: {fileID: 0} 349 | m_PrefabInternal: {fileID: 0} 350 | m_GameObject: {fileID: 325066834} 351 | m_Enabled: 1 352 | m_EditorHideFlags: 0 353 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 354 | m_Name: 355 | m_EditorClassIdentifier: 356 | m_Material: {fileID: 0} 357 | m_Color: {r: 1, g: 1, b: 1, a: 1} 358 | m_RaycastTarget: 1 359 | m_OnCullStateChanged: 360 | m_PersistentCalls: 361 | m_Calls: [] 362 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 363 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 364 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 365 | m_Type: 1 366 | m_PreserveAspect: 0 367 | m_FillCenter: 1 368 | m_FillMethod: 4 369 | m_FillAmount: 1 370 | m_FillClockwise: 1 371 | m_FillOrigin: 0 372 | --- !u!222 &325066838 373 | CanvasRenderer: 374 | m_ObjectHideFlags: 0 375 | m_PrefabParentObject: {fileID: 0} 376 | m_PrefabInternal: {fileID: 0} 377 | m_GameObject: {fileID: 325066834} 378 | --- !u!1 &519420028 379 | GameObject: 380 | m_ObjectHideFlags: 0 381 | m_PrefabParentObject: {fileID: 0} 382 | m_PrefabInternal: {fileID: 0} 383 | serializedVersion: 5 384 | m_Component: 385 | - component: {fileID: 519420032} 386 | - component: {fileID: 519420031} 387 | - component: {fileID: 519420029} 388 | m_Layer: 0 389 | m_Name: Main Camera 390 | m_TagString: MainCamera 391 | m_Icon: {fileID: 0} 392 | m_NavMeshLayer: 0 393 | m_StaticEditorFlags: 0 394 | m_IsActive: 1 395 | --- !u!81 &519420029 396 | AudioListener: 397 | m_ObjectHideFlags: 0 398 | m_PrefabParentObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 0} 400 | m_GameObject: {fileID: 519420028} 401 | m_Enabled: 1 402 | --- !u!20 &519420031 403 | Camera: 404 | m_ObjectHideFlags: 0 405 | m_PrefabParentObject: {fileID: 0} 406 | m_PrefabInternal: {fileID: 0} 407 | m_GameObject: {fileID: 519420028} 408 | m_Enabled: 1 409 | serializedVersion: 2 410 | m_ClearFlags: 2 411 | m_BackGroundColor: {r: 0.23529412, g: 0.2509804, b: 0.7764706, a: 1} 412 | m_NormalizedViewPortRect: 413 | serializedVersion: 2 414 | x: 0 415 | y: 0 416 | width: 1 417 | height: 1 418 | near clip plane: 0.3 419 | far clip plane: 1000 420 | field of view: 60 421 | orthographic: 1 422 | orthographic size: 5 423 | m_Depth: -1 424 | m_CullingMask: 425 | serializedVersion: 2 426 | m_Bits: 4294967295 427 | m_RenderingPath: -1 428 | m_TargetTexture: {fileID: 0} 429 | m_TargetDisplay: 0 430 | m_TargetEye: 0 431 | m_HDR: 1 432 | m_AllowMSAA: 0 433 | m_AllowDynamicResolution: 0 434 | m_ForceIntoRT: 0 435 | m_OcclusionCulling: 0 436 | m_StereoConvergence: 10 437 | m_StereoSeparation: 0.022 438 | --- !u!4 &519420032 439 | Transform: 440 | m_ObjectHideFlags: 0 441 | m_PrefabParentObject: {fileID: 0} 442 | m_PrefabInternal: {fileID: 0} 443 | m_GameObject: {fileID: 519420028} 444 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 445 | m_LocalPosition: {x: 0, y: 0, z: -10} 446 | m_LocalScale: {x: 1, y: 1, z: 1} 447 | m_Children: [] 448 | m_Father: {fileID: 0} 449 | m_RootOrder: 0 450 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 451 | --- !u!1 &779167651 452 | GameObject: 453 | m_ObjectHideFlags: 0 454 | m_PrefabParentObject: {fileID: 0} 455 | m_PrefabInternal: {fileID: 0} 456 | serializedVersion: 5 457 | m_Component: 458 | - component: {fileID: 779167652} 459 | - component: {fileID: 779167654} 460 | - component: {fileID: 779167653} 461 | m_Layer: 5 462 | m_Name: Text 463 | m_TagString: Untagged 464 | m_Icon: {fileID: 0} 465 | m_NavMeshLayer: 0 466 | m_StaticEditorFlags: 0 467 | m_IsActive: 1 468 | --- !u!224 &779167652 469 | RectTransform: 470 | m_ObjectHideFlags: 0 471 | m_PrefabParentObject: {fileID: 0} 472 | m_PrefabInternal: {fileID: 0} 473 | m_GameObject: {fileID: 779167651} 474 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 475 | m_LocalPosition: {x: 0, y: 0, z: 0} 476 | m_LocalScale: {x: 1, y: 1, z: 1} 477 | m_Children: [] 478 | m_Father: {fileID: 325066835} 479 | m_RootOrder: 0 480 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 481 | m_AnchorMin: {x: 0, y: 0} 482 | m_AnchorMax: {x: 1, y: 1} 483 | m_AnchoredPosition: {x: 0, y: 0} 484 | m_SizeDelta: {x: 0, y: 0} 485 | m_Pivot: {x: 0.5, y: 0.5} 486 | --- !u!114 &779167653 487 | MonoBehaviour: 488 | m_ObjectHideFlags: 0 489 | m_PrefabParentObject: {fileID: 0} 490 | m_PrefabInternal: {fileID: 0} 491 | m_GameObject: {fileID: 779167651} 492 | m_Enabled: 1 493 | m_EditorHideFlags: 0 494 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 495 | m_Name: 496 | m_EditorClassIdentifier: 497 | m_Material: {fileID: 0} 498 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 499 | m_RaycastTarget: 1 500 | m_OnCullStateChanged: 501 | m_PersistentCalls: 502 | m_Calls: [] 503 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 504 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 505 | m_FontData: 506 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 507 | m_FontSize: 14 508 | m_FontStyle: 0 509 | m_BestFit: 0 510 | m_MinSize: 10 511 | m_MaxSize: 40 512 | m_Alignment: 4 513 | m_AlignByGeometry: 0 514 | m_RichText: 1 515 | m_HorizontalOverflow: 0 516 | m_VerticalOverflow: 0 517 | m_LineSpacing: 1 518 | m_Text: 'Continious tracking: off' 519 | --- !u!222 &779167654 520 | CanvasRenderer: 521 | m_ObjectHideFlags: 0 522 | m_PrefabParentObject: {fileID: 0} 523 | m_PrefabInternal: {fileID: 0} 524 | m_GameObject: {fileID: 779167651} 525 | --- !u!1 &1121390146 526 | GameObject: 527 | m_ObjectHideFlags: 0 528 | m_PrefabParentObject: {fileID: 0} 529 | m_PrefabInternal: {fileID: 0} 530 | serializedVersion: 5 531 | m_Component: 532 | - component: {fileID: 1121390150} 533 | - component: {fileID: 1121390149} 534 | - component: {fileID: 1121390148} 535 | - component: {fileID: 1121390147} 536 | m_Layer: 5 537 | m_Name: Canvas 538 | m_TagString: Untagged 539 | m_Icon: {fileID: 0} 540 | m_NavMeshLayer: 0 541 | m_StaticEditorFlags: 0 542 | m_IsActive: 1 543 | --- !u!114 &1121390147 544 | MonoBehaviour: 545 | m_ObjectHideFlags: 0 546 | m_PrefabParentObject: {fileID: 0} 547 | m_PrefabInternal: {fileID: 0} 548 | m_GameObject: {fileID: 1121390146} 549 | m_Enabled: 1 550 | m_EditorHideFlags: 0 551 | m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} 552 | m_Name: 553 | m_EditorClassIdentifier: 554 | m_IgnoreReversedGraphics: 1 555 | m_BlockingObjects: 0 556 | m_BlockingMask: 557 | serializedVersion: 2 558 | m_Bits: 4294967295 559 | --- !u!114 &1121390148 560 | MonoBehaviour: 561 | m_ObjectHideFlags: 0 562 | m_PrefabParentObject: {fileID: 0} 563 | m_PrefabInternal: {fileID: 0} 564 | m_GameObject: {fileID: 1121390146} 565 | m_Enabled: 1 566 | m_EditorHideFlags: 0 567 | m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} 568 | m_Name: 569 | m_EditorClassIdentifier: 570 | m_UiScaleMode: 0 571 | m_ReferencePixelsPerUnit: 100 572 | m_ScaleFactor: 1 573 | m_ReferenceResolution: {x: 800, y: 600} 574 | m_ScreenMatchMode: 0 575 | m_MatchWidthOrHeight: 0 576 | m_PhysicalUnit: 3 577 | m_FallbackScreenDPI: 96 578 | m_DefaultSpriteDPI: 96 579 | m_DynamicPixelsPerUnit: 1 580 | --- !u!223 &1121390149 581 | Canvas: 582 | m_ObjectHideFlags: 0 583 | m_PrefabParentObject: {fileID: 0} 584 | m_PrefabInternal: {fileID: 0} 585 | m_GameObject: {fileID: 1121390146} 586 | m_Enabled: 1 587 | serializedVersion: 3 588 | m_RenderMode: 0 589 | m_Camera: {fileID: 0} 590 | m_PlaneDistance: 100 591 | m_PixelPerfect: 0 592 | m_ReceivesEvents: 1 593 | m_OverrideSorting: 0 594 | m_OverridePixelPerfect: 0 595 | m_SortingBucketNormalizedSize: 0 596 | m_AdditionalShaderChannelsFlag: 0 597 | m_SortingLayerID: 0 598 | m_SortingOrder: 0 599 | m_TargetDisplay: 0 600 | --- !u!224 &1121390150 601 | RectTransform: 602 | m_ObjectHideFlags: 0 603 | m_PrefabParentObject: {fileID: 0} 604 | m_PrefabInternal: {fileID: 0} 605 | m_GameObject: {fileID: 1121390146} 606 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 607 | m_LocalPosition: {x: 0, y: 0, z: 0} 608 | m_LocalScale: {x: 0, y: 0, z: 0} 609 | m_Children: 610 | - {fileID: 325066835} 611 | m_Father: {fileID: 0} 612 | m_RootOrder: 3 613 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 614 | m_AnchorMin: {x: 0, y: 0} 615 | m_AnchorMax: {x: 0, y: 0} 616 | m_AnchoredPosition: {x: 0, y: 0} 617 | m_SizeDelta: {x: 0, y: 0} 618 | m_Pivot: {x: 0, y: 0} 619 | --- !u!1 &1387254940 620 | GameObject: 621 | m_ObjectHideFlags: 0 622 | m_PrefabParentObject: {fileID: 0} 623 | m_PrefabInternal: {fileID: 0} 624 | serializedVersion: 5 625 | m_Component: 626 | - component: {fileID: 1387254943} 627 | - component: {fileID: 1387254942} 628 | - component: {fileID: 1387254941} 629 | m_Layer: 0 630 | m_Name: EventSystem 631 | m_TagString: Untagged 632 | m_Icon: {fileID: 0} 633 | m_NavMeshLayer: 0 634 | m_StaticEditorFlags: 0 635 | m_IsActive: 1 636 | --- !u!114 &1387254941 637 | MonoBehaviour: 638 | m_ObjectHideFlags: 0 639 | m_PrefabParentObject: {fileID: 0} 640 | m_PrefabInternal: {fileID: 0} 641 | m_GameObject: {fileID: 1387254940} 642 | m_Enabled: 1 643 | m_EditorHideFlags: 0 644 | m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} 645 | m_Name: 646 | m_EditorClassIdentifier: 647 | m_HorizontalAxis: Horizontal 648 | m_VerticalAxis: Vertical 649 | m_SubmitButton: Submit 650 | m_CancelButton: Cancel 651 | m_InputActionsPerSecond: 10 652 | m_RepeatDelay: 0.5 653 | m_ForceModuleActive: 0 654 | --- !u!114 &1387254942 655 | MonoBehaviour: 656 | m_ObjectHideFlags: 0 657 | m_PrefabParentObject: {fileID: 0} 658 | m_PrefabInternal: {fileID: 0} 659 | m_GameObject: {fileID: 1387254940} 660 | m_Enabled: 1 661 | m_EditorHideFlags: 0 662 | m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} 663 | m_Name: 664 | m_EditorClassIdentifier: 665 | m_FirstSelected: {fileID: 0} 666 | m_sendNavigationEvents: 1 667 | m_DragThreshold: 10 668 | --- !u!4 &1387254943 669 | Transform: 670 | m_ObjectHideFlags: 0 671 | m_PrefabParentObject: {fileID: 0} 672 | m_PrefabInternal: {fileID: 0} 673 | m_GameObject: {fileID: 1387254940} 674 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 675 | m_LocalPosition: {x: 0, y: 0, z: 0} 676 | m_LocalScale: {x: 1, y: 1, z: 1} 677 | m_Children: [] 678 | m_Father: {fileID: 0} 679 | m_RootOrder: 4 680 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 681 | --- !u!1 &1576284209 682 | GameObject: 683 | m_ObjectHideFlags: 0 684 | m_PrefabParentObject: {fileID: 0} 685 | m_PrefabInternal: {fileID: 0} 686 | serializedVersion: 5 687 | m_Component: 688 | - component: {fileID: 1576284212} 689 | - component: {fileID: 1576284211} 690 | - component: {fileID: 1576284210} 691 | m_Layer: 0 692 | m_Name: box 693 | m_TagString: Untagged 694 | m_Icon: {fileID: 0} 695 | m_NavMeshLayer: 0 696 | m_StaticEditorFlags: 0 697 | m_IsActive: 1 698 | --- !u!61 &1576284210 699 | BoxCollider2D: 700 | m_ObjectHideFlags: 0 701 | m_PrefabParentObject: {fileID: 0} 702 | m_PrefabInternal: {fileID: 0} 703 | m_GameObject: {fileID: 1576284209} 704 | m_Enabled: 1 705 | m_Density: 1 706 | m_Material: {fileID: 0} 707 | m_IsTrigger: 0 708 | m_UsedByEffector: 0 709 | m_UsedByComposite: 0 710 | m_Offset: {x: 0, y: 0} 711 | m_SpriteTilingProperty: 712 | border: {x: 0, y: 0, z: 0, w: 0} 713 | pivot: {x: 0.5, y: 0.5} 714 | oldSize: {x: 8, y: 6} 715 | newSize: {x: 8, y: 6} 716 | adaptiveTilingThreshold: 0.5 717 | drawMode: 0 718 | adaptiveTiling: 0 719 | m_AutoTiling: 0 720 | serializedVersion: 2 721 | m_Size: {x: 8, y: 6} 722 | m_EdgeRadius: 0 723 | --- !u!212 &1576284211 724 | SpriteRenderer: 725 | m_ObjectHideFlags: 0 726 | m_PrefabParentObject: {fileID: 0} 727 | m_PrefabInternal: {fileID: 0} 728 | m_GameObject: {fileID: 1576284209} 729 | m_Enabled: 1 730 | m_CastShadows: 0 731 | m_ReceiveShadows: 0 732 | m_DynamicOccludee: 1 733 | m_MotionVectors: 1 734 | m_LightProbeUsage: 1 735 | m_ReflectionProbeUsage: 1 736 | m_RenderingLayerMask: 4294967295 737 | m_Materials: 738 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 739 | m_StaticBatchInfo: 740 | firstSubMesh: 0 741 | subMeshCount: 0 742 | m_StaticBatchRoot: {fileID: 0} 743 | m_ProbeAnchor: {fileID: 0} 744 | m_LightProbeVolumeOverride: {fileID: 0} 745 | m_ScaleInLightmap: 1 746 | m_PreserveUVs: 0 747 | m_IgnoreNormalsForChartDetection: 0 748 | m_ImportantGI: 0 749 | m_StitchLightmapSeams: 0 750 | m_SelectedEditorRenderState: 0 751 | m_MinimumChartSize: 4 752 | m_AutoUVMaxDistance: 0.5 753 | m_AutoUVMaxAngle: 89 754 | m_LightmapParameters: {fileID: 0} 755 | m_SortingLayerID: 0 756 | m_SortingLayer: 0 757 | m_SortingOrder: 0 758 | m_Sprite: {fileID: 21300000, guid: 6ea56d8950080394d8f72267a5fb91d2, type: 3} 759 | m_Color: {r: 1, g: 1, b: 1, a: 1} 760 | m_FlipX: 0 761 | m_FlipY: 0 762 | m_DrawMode: 0 763 | m_Size: {x: 8, y: 6} 764 | m_AdaptiveModeThreshold: 0.5 765 | m_SpriteTileMode: 0 766 | m_WasSpriteAssigned: 1 767 | m_MaskInteraction: 0 768 | --- !u!4 &1576284212 769 | Transform: 770 | m_ObjectHideFlags: 0 771 | m_PrefabParentObject: {fileID: 0} 772 | m_PrefabInternal: {fileID: 0} 773 | m_GameObject: {fileID: 1576284209} 774 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 775 | m_LocalPosition: {x: 0, y: -4, z: 0} 776 | m_LocalScale: {x: 1.66, y: 0.16, z: 1} 777 | m_Children: [] 778 | m_Father: {fileID: 0} 779 | m_RootOrder: 2 780 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 781 | --- !u!1 &2030655790 782 | GameObject: 783 | m_ObjectHideFlags: 0 784 | m_PrefabParentObject: {fileID: 0} 785 | m_PrefabInternal: {fileID: 0} 786 | serializedVersion: 5 787 | m_Component: 788 | - component: {fileID: 2030655792} 789 | - component: {fileID: 2030655791} 790 | m_Layer: 0 791 | m_Name: Directional Light 792 | m_TagString: Untagged 793 | m_Icon: {fileID: 0} 794 | m_NavMeshLayer: 0 795 | m_StaticEditorFlags: 0 796 | m_IsActive: 1 797 | --- !u!108 &2030655791 798 | Light: 799 | m_ObjectHideFlags: 0 800 | m_PrefabParentObject: {fileID: 0} 801 | m_PrefabInternal: {fileID: 0} 802 | m_GameObject: {fileID: 2030655790} 803 | m_Enabled: 1 804 | serializedVersion: 8 805 | m_Type: 1 806 | m_Color: {r: 1, g: 1, b: 1, a: 1} 807 | m_Intensity: 1 808 | m_Range: 10 809 | m_SpotAngle: 30 810 | m_CookieSize: 10 811 | m_Shadows: 812 | m_Type: 0 813 | m_Resolution: -1 814 | m_CustomResolution: -1 815 | m_Strength: 1 816 | m_Bias: 0.05 817 | m_NormalBias: 0.4 818 | m_NearPlane: 0.2 819 | m_Cookie: {fileID: 0} 820 | m_DrawHalo: 0 821 | m_Flare: {fileID: 0} 822 | m_RenderMode: 0 823 | m_CullingMask: 824 | serializedVersion: 2 825 | m_Bits: 4294967295 826 | m_Lightmapping: 4 827 | m_AreaSize: {x: 1, y: 1} 828 | m_BounceIntensity: 1 829 | m_ColorTemperature: 6570 830 | m_UseColorTemperature: 0 831 | m_ShadowRadius: 0 832 | m_ShadowAngle: 0 833 | --- !u!4 &2030655792 834 | Transform: 835 | m_ObjectHideFlags: 0 836 | m_PrefabParentObject: {fileID: 0} 837 | m_PrefabInternal: {fileID: 0} 838 | m_GameObject: {fileID: 2030655790} 839 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 840 | m_LocalPosition: {x: 0, y: 0, z: 0} 841 | m_LocalScale: {x: 1, y: 1, z: 1} 842 | m_Children: [] 843 | m_Father: {fileID: 0} 844 | m_RootOrder: 5 845 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 846 | -------------------------------------------------------------------------------- /Assets/Scenes/Main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cda990e2423bbf4892e6590ba056729 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 145d3431405afa8489efed8e9f92cd24 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/GameManager.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UnityEngine.UI; 7 | using Random = UnityEngine.Random; 8 | 9 | public class GameManager : MonoBehaviour { 10 | List positions; 11 | Vector2 position; 12 | public String[] colorPicker; 13 | public bool continousTracking; 14 | public Text text; 15 | public Material lineColor; 16 | Color myColor = new Color(); 17 | // Use this for initialization 18 | void Start () { 19 | positions = new List(); 20 | } 21 | 22 | public void Update(){ 23 | if(!continousTracking){ 24 | if(Input.GetMouseButtonDown(0)){ 25 | drawingNodes(); 26 | } 27 | }else{ 28 | if(Input.GetMouseButton(0)){ 29 | drawingNodes(); 30 | } 31 | } 32 | if(Input.GetMouseButtonDown(1)){ 33 | MakeShape(positions.ToArray(),myColor); 34 | } 35 | } 36 | 37 | public void ContiniousTracking(){ 38 | continousTracking = ! continousTracking; 39 | if(continousTracking){ 40 | text.text = "ContiniousTracking: on"; 41 | GetComponent().SetWidth(0.25f,0.25f); 42 | }else { 43 | text.text = "continiousTracking: off"; 44 | GetComponent().SetWidth(0.07f,0.07f); 45 | } 46 | positions = new List(); 47 | } 48 | 49 | public void drawingNodes(){ 50 | if(positions.Count == 1){ 51 | ColorUtility.TryParseHtmlString(colorPicker[Random.Range(0,colorPicker.Length)], out myColor); 52 | lineColor.color = myColor; 53 | } 54 | position = Camera.main.ScreenToWorldPoint(Input.mousePosition); 55 | positions.Add(position); 56 | GetComponent().SetVertexCount(positions.Count); 57 | GetComponent().SetPosition(positions.Count-1,position); 58 | } 59 | 60 | public void MakeShape(Vector2[] vertices2D, Color color){ 61 | var vertices3D = System.Array.ConvertAll(vertices2D, v => v); 62 | var triangulator = new Triangulator(vertices2D); 63 | var indices = triangulator.Triangulate(); 64 | var colors = 65 | Enumerable.Range(0, vertices3D.Length) 66 | .Select(i => color) 67 | .ToArray(); 68 | var mesh = new Mesh{ 69 | vertices = vertices3D, 70 | triangles = indices, 71 | colors = colors 72 | }; 73 | GameObject gameObject = new GameObject(); 74 | mesh.RecalculateNormals(); 75 | mesh.RecalculateBounds(); 76 | if(gameObject.GetComponent() == null) gameObject.AddComponent().material = new Material(Shader.Find("Sprites/Default")); 77 | if(gameObject.GetComponent() == null)gameObject.AddComponent().mesh = mesh; 78 | if(gameObject.GetComponent() == null)gameObject.AddComponent().mass = 700f; 79 | if(gameObject.GetComponent() == null) gameObject.AddComponent().points = positions.ToArray(); 80 | GetComponent().SetVertexCount(0); 81 | positions = new List(); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Assets/Scripts/GameManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12d596d1217351f45880fc082708c8e3 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/Triangulator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Triangulator : MonoBehaviour { 6 | 7 | private List m_points = new List(); 8 | 9 | public Triangulator (Vector2[] points) { 10 | m_points = new List(points); 11 | } 12 | 13 | public int[] Triangulate() { 14 | List indices = new List(); 15 | 16 | int n = m_points.Count; 17 | if (n < 3) 18 | return indices.ToArray(); 19 | 20 | int[] V = new int[n]; 21 | if (Area() > 0) { 22 | for (int v = 0; v < n; v++) 23 | V[v] = v; 24 | } 25 | else { 26 | for (int v = 0; v < n; v++) 27 | V[v] = (n - 1) - v; 28 | } 29 | 30 | int nv = n; 31 | int count = 2 * nv; 32 | for (int m = 0, v = nv - 1; nv > 2; ) { 33 | if ((count--) <= 0) 34 | return indices.ToArray(); 35 | 36 | int u = v; 37 | if (nv <= u) 38 | u = 0; 39 | v = u + 1; 40 | if (nv <= v) 41 | v = 0; 42 | int w = v + 1; 43 | if (nv <= w) 44 | w = 0; 45 | 46 | if (Snip(u, v, w, nv, V)) { 47 | int a, b, c, s, t; 48 | a = V[u]; 49 | b = V[v]; 50 | c = V[w]; 51 | indices.Add(a); 52 | indices.Add(b); 53 | indices.Add(c); 54 | m++; 55 | for (s = v, t = v + 1; t < nv; s++, t++) 56 | V[s] = V[t]; 57 | nv--; 58 | count = 2 * nv; 59 | } 60 | } 61 | 62 | indices.Reverse(); 63 | return indices.ToArray(); 64 | } 65 | 66 | private float Area () { 67 | int n = m_points.Count; 68 | float A = 0.0f; 69 | for (int p = n - 1, q = 0; q < n; p = q++) { 70 | Vector2 pval = m_points[p]; 71 | Vector2 qval = m_points[q]; 72 | A += pval.x * qval.y - qval.x * pval.y; 73 | } 74 | return (A * 0.5f); 75 | } 76 | 77 | private bool Snip (int u, int v, int w, int n, int[] V) { 78 | int p; 79 | Vector2 A = m_points[V[u]]; 80 | Vector2 B = m_points[V[v]]; 81 | Vector2 C = m_points[V[w]]; 82 | if (Mathf.Epsilon > (((B.x - A.x) * (C.y - A.y)) - ((B.y - A.y) * (C.x - A.x)))) 83 | return false; 84 | for (p = 0; p < n; p++) { 85 | if ((p == u) || (p == v) || (p == w)) 86 | continue; 87 | Vector2 P = m_points[V[p]]; 88 | if (InsideTriangle(A, B, C, P)) 89 | return false; 90 | } 91 | return true; 92 | } 93 | 94 | private bool InsideTriangle (Vector2 A, Vector2 B, Vector2 C, Vector2 P) { 95 | float ax, ay, bx, by, cx, cy, apx, apy, bpx, bpy, cpx, cpy; 96 | float cCROSSap, bCROSScp, aCROSSbp; 97 | 98 | ax = C.x - B.x; ay = C.y - B.y; 99 | bx = A.x - C.x; by = A.y - C.y; 100 | cx = B.x - A.x; cy = B.y - A.y; 101 | apx = P.x - A.x; apy = P.y - A.y; 102 | bpx = P.x - B.x; bpy = P.y - B.y; 103 | cpx = P.x - C.x; cpy = P.y - C.y; 104 | 105 | aCROSSbp = ax * bpy - ay * bpx; 106 | cCROSSap = cx * apy - cy * apx; 107 | bCROSScp = bx * cpy - by * cpx; 108 | 109 | return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f)); 110 | } 111 | } 112 | 113 | -------------------------------------------------------------------------------- /Assets/Scripts/Triangulator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e950ee69b2d10394e9dc298719b04343 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48c3d844e24f3594aa087d9066c01238 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sprites/box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oussamabonnor1/2DShapes_Drawing_Unity/8385e9b0a09a2e180a818aa53691268cc3511438/Assets/Sprites/box.png -------------------------------------------------------------------------------- /Assets/Sprites/box.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ea56d8950080394d8f72267a5fb91d2 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 5 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: 1 36 | wrapV: 1 37 | wrapW: 1 38 | nPOTScale: 0 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 1 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | singleChannelComponent: 0 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - serializedVersion: 2 60 | buildTarget: DefaultTexturePlatform 61 | maxTextureSize: 2048 62 | resizeAlgorithm: 0 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | androidETC2FallbackOverride: 0 70 | spriteSheet: 71 | serializedVersion: 2 72 | sprites: [] 73 | outline: [] 74 | physicsShape: [] 75 | bones: [] 76 | spriteID: 779b92b22b7629040a25c7a11b6b603c 77 | vertices: [] 78 | indices: 79 | edges: [] 80 | weights: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/shader drawing GIF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oussamabonnor1/2DShapes_Drawing_Unity/8385e9b0a09a2e180a818aa53691268cc3511438/Assets/shader drawing GIF.gif -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Oussama Bonnor 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 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /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: 1024 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: 7 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: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /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 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: 2cda990e2423bbf4892e6590ba056729 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /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: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 1 11 | m_SpritePackerMode: 4 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /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: 10753, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 34 | m_PreloadedShaders: [] 35 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 36 | type: 0} 37 | m_CustomRenderPipeline: {fileID: 0} 38 | m_TransparencySortMode: 0 39 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 40 | m_DefaultRenderingPath: 1 41 | m_DefaultMobileRenderingPath: 1 42 | m_TierSettings: [] 43 | m_LightmapStripping: 0 44 | m_FogStripping: 0 45 | m_InstancingStripping: 0 46 | m_LightmapKeepPlain: 1 47 | m_LightmapKeepDirCombined: 1 48 | m_LightmapKeepDynamicPlain: 1 49 | m_LightmapKeepDynamicDirCombined: 1 50 | m_LightmapKeepShadowMask: 1 51 | m_LightmapKeepSubtractive: 1 52 | m_FogKeepLinear: 1 53 | m_FogKeepExp: 1 54 | m_FogKeepExp2: 1 55 | m_AlbedoSwatchInfos: [] 56 | m_LightsUseLinearIntensity: 0 57 | m_LightsUseColorTemperature: 0 58 | -------------------------------------------------------------------------------- /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/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 20 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: bfcfc320427f8224bbb7a96f3d3aebad, 13 | type: 2} 14 | -------------------------------------------------------------------------------- /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: 15 7 | productGUID: 65fd0faffd6ee104bbc8cf6a47d2b540 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: 2D shapes generator 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: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | tizenShowActivityIndicatorOnLoading: -1 56 | iosAppInBackgroundBehavior: 0 57 | displayResolutionDialog: 1 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidBlitType: 0 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 1 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.games 84 | gpuSkinning: 0 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | fullscreenMode: 1 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | n3dsDisableStereoscopicView: 0 101 | n3dsEnableSharedListOpt: 1 102 | n3dsEnableVSync: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | m_SupportedAspectRatios: 115 | 4:3: 1 116 | 5:4: 1 117 | 16:10: 1 118 | 16:9: 1 119 | Others: 1 120 | bundleVersion: 0.1 121 | preloadedAssets: [] 122 | metroInputSource: 0 123 | wsaTransparentSwapchain: 0 124 | m_HolographicPauseOnTrackingLoss: 1 125 | xboxOneDisableKinectGpuReservation: 0 126 | xboxOneEnable7thCore: 0 127 | vrSettings: 128 | cardboard: 129 | depthFormat: 0 130 | enableTransitionView: 0 131 | daydream: 132 | depthFormat: 0 133 | useSustainedPerformanceMode: 0 134 | enableVideoLayer: 0 135 | useProtectedVideoMemory: 0 136 | minimumSupportedHeadTracking: 0 137 | maximumSupportedHeadTracking: 1 138 | hololens: 139 | depthFormat: 1 140 | depthBufferSharingEnabled: 0 141 | enable360StereoCapture: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | protectGraphicsMemory: 0 146 | useHDRDisplay: 0 147 | m_ColorGamuts: 00000000 148 | targetPixelDensity: 30 149 | resolutionScalingMode: 0 150 | androidSupportedAspectRatio: 1 151 | androidMaxAspectRatio: 2.1 152 | applicationIdentifier: 153 | Standalone: com.Company.ProductName 154 | buildNumber: {} 155 | AndroidBundleVersionCode: 1 156 | AndroidMinSdkVersion: 16 157 | AndroidTargetSdkVersion: 0 158 | AndroidPreferredInstallLocation: 1 159 | aotOptions: 160 | stripEngineCode: 1 161 | iPhoneStrippingLevel: 0 162 | iPhoneScriptCallOptimization: 0 163 | ForceInternetPermission: 0 164 | ForceSDCardPermission: 0 165 | CreateWallpaper: 0 166 | APKExpansionFiles: 0 167 | keepLoadedShadersAlive: 0 168 | StripUnusedMeshComponents: 1 169 | VertexChannelCompressionMask: 4054 170 | iPhoneSdkVersion: 988 171 | iOSTargetOSVersionString: 8.0 172 | tvOSSdkVersion: 0 173 | tvOSRequireExtendedGameController: 0 174 | tvOSTargetOSVersionString: 9.0 175 | uIPrerenderedIcon: 0 176 | uIRequiresPersistentWiFi: 0 177 | uIRequiresFullScreen: 1 178 | uIStatusBarHidden: 1 179 | uIExitOnSuspend: 0 180 | uIStatusBarStyle: 0 181 | iPhoneSplashScreen: {fileID: 0} 182 | iPhoneHighResSplashScreen: {fileID: 0} 183 | iPhoneTallHighResSplashScreen: {fileID: 0} 184 | iPhone47inSplashScreen: {fileID: 0} 185 | iPhone55inPortraitSplashScreen: {fileID: 0} 186 | iPhone55inLandscapeSplashScreen: {fileID: 0} 187 | iPhone58inPortraitSplashScreen: {fileID: 0} 188 | iPhone58inLandscapeSplashScreen: {fileID: 0} 189 | iPadPortraitSplashScreen: {fileID: 0} 190 | iPadHighResPortraitSplashScreen: {fileID: 0} 191 | iPadLandscapeSplashScreen: {fileID: 0} 192 | iPadHighResLandscapeSplashScreen: {fileID: 0} 193 | appleTVSplashScreen: {fileID: 0} 194 | appleTVSplashScreen2x: {fileID: 0} 195 | tvOSSmallIconLayers: [] 196 | tvOSSmallIconLayers2x: [] 197 | tvOSLargeIconLayers: [] 198 | tvOSLargeIconLayers2x: [] 199 | tvOSTopShelfImageLayers: [] 200 | tvOSTopShelfImageLayers2x: [] 201 | tvOSTopShelfImageWideLayers: [] 202 | tvOSTopShelfImageWideLayers2x: [] 203 | iOSLaunchScreenType: 0 204 | iOSLaunchScreenPortrait: {fileID: 0} 205 | iOSLaunchScreenLandscape: {fileID: 0} 206 | iOSLaunchScreenBackgroundColor: 207 | serializedVersion: 2 208 | rgba: 0 209 | iOSLaunchScreenFillPct: 100 210 | iOSLaunchScreenSize: 100 211 | iOSLaunchScreenCustomXibPath: 212 | iOSLaunchScreeniPadType: 0 213 | iOSLaunchScreeniPadImage: {fileID: 0} 214 | iOSLaunchScreeniPadBackgroundColor: 215 | serializedVersion: 2 216 | rgba: 0 217 | iOSLaunchScreeniPadFillPct: 100 218 | iOSLaunchScreeniPadSize: 100 219 | iOSLaunchScreeniPadCustomXibPath: 220 | iOSUseLaunchScreenStoryboard: 0 221 | iOSLaunchScreenCustomStoryboardPath: 222 | iOSDeviceRequirements: [] 223 | iOSURLSchemes: [] 224 | iOSBackgroundModes: 0 225 | iOSMetalForceHardShadows: 0 226 | metalEditorSupport: 1 227 | metalAPIValidation: 1 228 | iOSRenderExtraFrameOnPause: 0 229 | appleDeveloperTeamID: 230 | iOSManualSigningProvisioningProfileID: 231 | tvOSManualSigningProvisioningProfileID: 232 | iOSManualSigningProvisioningProfileType: 0 233 | tvOSManualSigningProvisioningProfileType: 0 234 | appleEnableAutomaticSigning: 0 235 | iOSRequireARKit: 0 236 | appleEnableProMotion: 0 237 | clonedFromGUID: fe97a795c6621624a9fc94fd2443b1a8 238 | templatePackageId: com.unity.template.2d@1.0.0 239 | templateDefaultScene: Assets/Scenes/SampleScene.unity 240 | AndroidTargetArchitectures: 5 241 | AndroidSplashScreenScale: 0 242 | androidSplashScreen: {fileID: 0} 243 | AndroidKeystoreName: 244 | AndroidKeyaliasName: 245 | AndroidTVCompatibility: 1 246 | AndroidIsGame: 1 247 | AndroidEnableTango: 0 248 | androidEnableBanner: 1 249 | androidUseLowAccuracyLocation: 0 250 | m_AndroidBanners: 251 | - width: 320 252 | height: 180 253 | banner: {fileID: 0} 254 | androidGamepadSupportLevel: 0 255 | resolutionDialogBanner: {fileID: 0} 256 | m_BuildTargetIcons: [] 257 | m_BuildTargetPlatformIcons: [] 258 | m_BuildTargetBatching: 259 | - m_BuildTarget: Standalone 260 | m_StaticBatching: 1 261 | m_DynamicBatching: 0 262 | - m_BuildTarget: iPhone 263 | m_StaticBatching: 1 264 | m_DynamicBatching: 0 265 | - m_BuildTarget: tvOS 266 | m_StaticBatching: 1 267 | m_DynamicBatching: 0 268 | - m_BuildTarget: Android 269 | m_StaticBatching: 1 270 | m_DynamicBatching: 0 271 | - m_BuildTarget: WebGL 272 | m_StaticBatching: 0 273 | m_DynamicBatching: 0 274 | m_BuildTargetGraphicsAPIs: 275 | - m_BuildTarget: iOSSupport 276 | m_APIs: 10000000 277 | m_Automatic: 1 278 | - m_BuildTarget: AppleTVSupport 279 | m_APIs: 10000000 280 | m_Automatic: 0 281 | - m_BuildTarget: AndroidPlayer 282 | m_APIs: 0b00000015000000 283 | m_Automatic: 1 284 | - m_BuildTarget: WebGLSupport 285 | m_APIs: 0b000000 286 | m_Automatic: 1 287 | m_BuildTargetVRSettings: [] 288 | m_BuildTargetEnableVuforiaSettings: [] 289 | openGLRequireES31: 0 290 | openGLRequireES31AEP: 0 291 | m_TemplateCustomTags: {} 292 | mobileMTRendering: 293 | Android: 1 294 | iPhone: 1 295 | tvOS: 1 296 | m_BuildTargetGroupLightmapEncodingQuality: [] 297 | playModeTestRunnerEnabled: 0 298 | runPlayModeTestAsEditModeTest: 0 299 | actionOnDotNetUnhandledException: 1 300 | enableInternalProfiler: 0 301 | logObjCUncaughtExceptions: 1 302 | enableCrashReportAPI: 0 303 | cameraUsageDescription: 304 | locationUsageDescription: 305 | microphoneUsageDescription: 306 | switchNetLibKey: 307 | switchSocketMemoryPoolSize: 6144 308 | switchSocketAllocatorPoolSize: 128 309 | switchSocketConcurrencyLimit: 14 310 | switchScreenResolutionBehavior: 2 311 | switchUseCPUProfiler: 0 312 | switchApplicationID: 0x01004b9000490000 313 | switchNSODependencies: 314 | switchTitleNames_0: 315 | switchTitleNames_1: 316 | switchTitleNames_2: 317 | switchTitleNames_3: 318 | switchTitleNames_4: 319 | switchTitleNames_5: 320 | switchTitleNames_6: 321 | switchTitleNames_7: 322 | switchTitleNames_8: 323 | switchTitleNames_9: 324 | switchTitleNames_10: 325 | switchTitleNames_11: 326 | switchTitleNames_12: 327 | switchTitleNames_13: 328 | switchTitleNames_14: 329 | switchPublisherNames_0: 330 | switchPublisherNames_1: 331 | switchPublisherNames_2: 332 | switchPublisherNames_3: 333 | switchPublisherNames_4: 334 | switchPublisherNames_5: 335 | switchPublisherNames_6: 336 | switchPublisherNames_7: 337 | switchPublisherNames_8: 338 | switchPublisherNames_9: 339 | switchPublisherNames_10: 340 | switchPublisherNames_11: 341 | switchPublisherNames_12: 342 | switchPublisherNames_13: 343 | switchPublisherNames_14: 344 | switchIcons_0: {fileID: 0} 345 | switchIcons_1: {fileID: 0} 346 | switchIcons_2: {fileID: 0} 347 | switchIcons_3: {fileID: 0} 348 | switchIcons_4: {fileID: 0} 349 | switchIcons_5: {fileID: 0} 350 | switchIcons_6: {fileID: 0} 351 | switchIcons_7: {fileID: 0} 352 | switchIcons_8: {fileID: 0} 353 | switchIcons_9: {fileID: 0} 354 | switchIcons_10: {fileID: 0} 355 | switchIcons_11: {fileID: 0} 356 | switchIcons_12: {fileID: 0} 357 | switchIcons_13: {fileID: 0} 358 | switchIcons_14: {fileID: 0} 359 | switchSmallIcons_0: {fileID: 0} 360 | switchSmallIcons_1: {fileID: 0} 361 | switchSmallIcons_2: {fileID: 0} 362 | switchSmallIcons_3: {fileID: 0} 363 | switchSmallIcons_4: {fileID: 0} 364 | switchSmallIcons_5: {fileID: 0} 365 | switchSmallIcons_6: {fileID: 0} 366 | switchSmallIcons_7: {fileID: 0} 367 | switchSmallIcons_8: {fileID: 0} 368 | switchSmallIcons_9: {fileID: 0} 369 | switchSmallIcons_10: {fileID: 0} 370 | switchSmallIcons_11: {fileID: 0} 371 | switchSmallIcons_12: {fileID: 0} 372 | switchSmallIcons_13: {fileID: 0} 373 | switchSmallIcons_14: {fileID: 0} 374 | switchManualHTML: 375 | switchAccessibleURLs: 376 | switchLegalInformation: 377 | switchMainThreadStackSize: 1048576 378 | switchPresenceGroupId: 379 | switchLogoHandling: 0 380 | switchReleaseVersion: 0 381 | switchDisplayVersion: 1.0.0 382 | switchStartupUserAccount: 0 383 | switchTouchScreenUsage: 0 384 | switchSupportedLanguagesMask: 0 385 | switchLogoType: 0 386 | switchApplicationErrorCodeCategory: 387 | switchUserAccountSaveDataSize: 0 388 | switchUserAccountSaveDataJournalSize: 0 389 | switchApplicationAttribute: 0 390 | switchCardSpecSize: -1 391 | switchCardSpecClock: -1 392 | switchRatingsMask: 0 393 | switchRatingsInt_0: 0 394 | switchRatingsInt_1: 0 395 | switchRatingsInt_2: 0 396 | switchRatingsInt_3: 0 397 | switchRatingsInt_4: 0 398 | switchRatingsInt_5: 0 399 | switchRatingsInt_6: 0 400 | switchRatingsInt_7: 0 401 | switchRatingsInt_8: 0 402 | switchRatingsInt_9: 0 403 | switchRatingsInt_10: 0 404 | switchRatingsInt_11: 0 405 | switchLocalCommunicationIds_0: 406 | switchLocalCommunicationIds_1: 407 | switchLocalCommunicationIds_2: 408 | switchLocalCommunicationIds_3: 409 | switchLocalCommunicationIds_4: 410 | switchLocalCommunicationIds_5: 411 | switchLocalCommunicationIds_6: 412 | switchLocalCommunicationIds_7: 413 | switchParentalControl: 0 414 | switchAllowsScreenshot: 1 415 | switchAllowsVideoCapturing: 1 416 | switchAllowsRuntimeAddOnContentInstall: 0 417 | switchDataLossConfirmation: 0 418 | switchSupportedNpadStyles: 3 419 | switchNativeFsCacheSize: 32 420 | switchSocketConfigEnabled: 0 421 | switchTcpInitialSendBufferSize: 32 422 | switchTcpInitialReceiveBufferSize: 64 423 | switchTcpAutoSendBufferSizeMax: 256 424 | switchTcpAutoReceiveBufferSizeMax: 256 425 | switchUdpSendBufferSize: 9 426 | switchUdpReceiveBufferSize: 42 427 | switchSocketBufferEfficiency: 4 428 | switchSocketInitializeEnabled: 1 429 | switchNetworkInterfaceManagerInitializeEnabled: 1 430 | switchPlayerConnectionEnabled: 1 431 | ps4NPAgeRating: 12 432 | ps4NPTitleSecret: 433 | ps4NPTrophyPackPath: 434 | ps4ParentalLevel: 11 435 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 436 | ps4Category: 0 437 | ps4MasterVersion: 01.00 438 | ps4AppVersion: 01.00 439 | ps4AppType: 0 440 | ps4ParamSfxPath: 441 | ps4VideoOutPixelFormat: 0 442 | ps4VideoOutInitialWidth: 1920 443 | ps4VideoOutBaseModeInitialWidth: 1920 444 | ps4VideoOutReprojectionRate: 60 445 | ps4PronunciationXMLPath: 446 | ps4PronunciationSIGPath: 447 | ps4BackgroundImagePath: 448 | ps4StartupImagePath: 449 | ps4StartupImagesFolder: 450 | ps4IconImagesFolder: 451 | ps4SaveDataImagePath: 452 | ps4SdkOverride: 453 | ps4BGMPath: 454 | ps4ShareFilePath: 455 | ps4ShareOverlayImagePath: 456 | ps4PrivacyGuardImagePath: 457 | ps4NPtitleDatPath: 458 | ps4RemotePlayKeyAssignment: -1 459 | ps4RemotePlayKeyMappingDir: 460 | ps4PlayTogetherPlayerCount: 0 461 | ps4EnterButtonAssignment: 1 462 | ps4ApplicationParam1: 0 463 | ps4ApplicationParam2: 0 464 | ps4ApplicationParam3: 0 465 | ps4ApplicationParam4: 0 466 | ps4DownloadDataSize: 0 467 | ps4GarlicHeapSize: 2048 468 | ps4ProGarlicHeapSize: 2560 469 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 470 | ps4pnSessions: 1 471 | ps4pnPresence: 1 472 | ps4pnFriends: 1 473 | ps4pnGameCustomData: 1 474 | playerPrefsSupport: 0 475 | enableApplicationExit: 0 476 | restrictedAudioUsageRights: 0 477 | ps4UseResolutionFallback: 0 478 | ps4ReprojectionSupport: 0 479 | ps4UseAudio3dBackend: 0 480 | ps4SocialScreenEnabled: 0 481 | ps4ScriptOptimizationLevel: 0 482 | ps4Audio3dVirtualSpeakerCount: 14 483 | ps4attribCpuUsage: 0 484 | ps4PatchPkgPath: 485 | ps4PatchLatestPkgPath: 486 | ps4PatchChangeinfoPath: 487 | ps4PatchDayOne: 0 488 | ps4attribUserManagement: 0 489 | ps4attribMoveSupport: 0 490 | ps4attrib3DSupport: 0 491 | ps4attribShareSupport: 0 492 | ps4attribExclusiveVR: 0 493 | ps4disableAutoHideSplash: 0 494 | ps4videoRecordingFeaturesUsed: 0 495 | ps4contentSearchFeaturesUsed: 0 496 | ps4attribEyeToEyeDistanceSettingVR: 0 497 | ps4IncludedModules: [] 498 | monoEnv: 499 | psp2Splashimage: {fileID: 0} 500 | psp2NPTrophyPackPath: 501 | psp2NPSupportGBMorGJP: 0 502 | psp2NPAgeRating: 12 503 | psp2NPTitleDatPath: 504 | psp2NPCommsID: 505 | psp2NPCommunicationsID: 506 | psp2NPCommsPassphrase: 507 | psp2NPCommsSig: 508 | psp2ParamSfxPath: 509 | psp2ManualPath: 510 | psp2LiveAreaGatePath: 511 | psp2LiveAreaBackroundPath: 512 | psp2LiveAreaPath: 513 | psp2LiveAreaTrialPath: 514 | psp2PatchChangeInfoPath: 515 | psp2PatchOriginalPackage: 516 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 517 | psp2KeystoneFile: 518 | psp2MemoryExpansionMode: 0 519 | psp2DRMType: 0 520 | psp2StorageType: 0 521 | psp2MediaCapacity: 0 522 | psp2DLCConfigPath: 523 | psp2ThumbnailPath: 524 | psp2BackgroundPath: 525 | psp2SoundPath: 526 | psp2TrophyCommId: 527 | psp2TrophyPackagePath: 528 | psp2PackagedResourcesPath: 529 | psp2SaveDataQuota: 10240 530 | psp2ParentalLevel: 1 531 | psp2ShortTitle: Not Set 532 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 533 | psp2Category: 0 534 | psp2MasterVersion: 01.00 535 | psp2AppVersion: 01.00 536 | psp2TVBootMode: 0 537 | psp2EnterButtonAssignment: 2 538 | psp2TVDisableEmu: 0 539 | psp2AllowTwitterDialog: 1 540 | psp2Upgradable: 0 541 | psp2HealthWarning: 0 542 | psp2UseLibLocation: 0 543 | psp2InfoBarOnStartup: 0 544 | psp2InfoBarColor: 0 545 | psp2ScriptOptimizationLevel: 0 546 | splashScreenBackgroundSourceLandscape: {fileID: 0} 547 | splashScreenBackgroundSourcePortrait: {fileID: 0} 548 | spritePackerPolicy: 549 | webGLMemorySize: 256 550 | webGLExceptionSupport: 1 551 | webGLNameFilesAsHashes: 0 552 | webGLDataCaching: 0 553 | webGLDebugSymbols: 0 554 | webGLEmscriptenArgs: 555 | webGLModulesDirectory: 556 | webGLTemplate: APPLICATION:Default 557 | webGLAnalyzeBuildSize: 0 558 | webGLUseEmbeddedResources: 0 559 | webGLCompressionFormat: 1 560 | webGLLinkerTarget: 0 561 | scriptingDefineSymbols: {} 562 | platformArchitecture: {} 563 | scriptingBackend: {} 564 | il2cppCompilerConfiguration: {} 565 | incrementalIl2cppBuild: {} 566 | allowUnsafeCode: 0 567 | additionalIl2CppArgs: 568 | scriptingRuntimeVersion: 0 569 | apiCompatibilityLevelPerPlatform: {} 570 | m_RenderingPath: 1 571 | m_MobileRenderingPath: 1 572 | metroPackageName: Template_2D 573 | metroPackageVersion: 574 | metroCertificatePath: 575 | metroCertificatePassword: 576 | metroCertificateSubject: 577 | metroCertificateIssuer: 578 | metroCertificateNotAfter: 0000000000000000 579 | metroApplicationDescription: Template_2D 580 | wsaImages: {} 581 | metroTileShortName: 582 | metroCommandLineArgsFile: 583 | metroTileShowName: 0 584 | metroMediumTileShowName: 0 585 | metroLargeTileShowName: 0 586 | metroWideTileShowName: 0 587 | metroDefaultTileSize: 1 588 | metroTileForegroundText: 2 589 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 590 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 591 | a: 1} 592 | metroSplashScreenUseBackgroundColor: 0 593 | platformCapabilities: {} 594 | metroFTAName: 595 | metroFTAFileTypes: [] 596 | metroProtocolName: 597 | metroCompilationOverrides: 1 598 | tizenProductDescription: 599 | tizenProductURL: 600 | tizenSigningProfileName: 601 | tizenGPSPermissions: 0 602 | tizenMicrophonePermissions: 0 603 | tizenDeploymentTarget: 604 | tizenDeploymentTargetType: -1 605 | tizenMinOSVersion: 1 606 | n3dsUseExtSaveData: 0 607 | n3dsCompressStaticMem: 1 608 | n3dsExtSaveDataNumber: 0x12345 609 | n3dsStackSize: 131072 610 | n3dsTargetPlatform: 2 611 | n3dsRegion: 7 612 | n3dsMediaSize: 0 613 | n3dsLogoStyle: 3 614 | n3dsTitle: GameName 615 | n3dsProductCode: 616 | n3dsApplicationId: 0xFF3FF 617 | XboxOneProductId: 618 | XboxOneUpdateKey: 619 | XboxOneSandboxId: 620 | XboxOneContentId: 621 | XboxOneTitleId: 622 | XboxOneSCId: 623 | XboxOneGameOsOverridePath: 624 | XboxOnePackagingOverridePath: 625 | XboxOneAppManifestOverridePath: 626 | XboxOnePackageEncryption: 0 627 | XboxOnePackageUpdateGranularity: 2 628 | XboxOneDescription: 629 | XboxOneLanguage: 630 | - enus 631 | XboxOneCapability: [] 632 | XboxOneGameRating: {} 633 | XboxOneIsContentPackage: 0 634 | XboxOneEnableGPUVariability: 0 635 | XboxOneSockets: {} 636 | XboxOneSplashScreen: {fileID: 0} 637 | XboxOneAllowedProductIds: [] 638 | XboxOnePersistentLocalStorageSize: 0 639 | XboxOneXTitleMemory: 8 640 | xboxOneScriptCompiler: 0 641 | vrEditorSettings: 642 | daydream: 643 | daydreamIconForeground: {fileID: 0} 644 | daydreamIconBackground: {fileID: 0} 645 | cloudServicesEnabled: 646 | UNet: 1 647 | facebookSdkVersion: 7.9.4 648 | apiCompatibilityLevel: 2 649 | cloudProjectId: 650 | projectName: Template_2D 651 | organizationId: 652 | cloudEnabled: 0 653 | enableNativePlatformBackendsForNewInputSystem: 0 654 | disableOldInputManagerSupport: 0 655 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.1.3f1 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: 3 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: 0 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: 0 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: 0 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: 0 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 0 112 | billboardsFaceCameraPosition: 0 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: 0 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: 0 136 | antiAliasing: 0 137 | softParticles: 0 138 | softVegetation: 1 139 | realtimeReflectionProbes: 0 140 | billboardsFaceCameraPosition: 0 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: 0 153 | shadowResolution: 0 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: 0 164 | antiAliasing: 0 165 | softParticles: 0 166 | softVegetation: 1 167 | realtimeReflectionProbes: 0 168 | billboardsFaceCameraPosition: 0 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 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /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.0167 7 | Maximum Allowed Timestep: 0.1 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: 1 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 | # 2DShapes_Drawing_Unity 2 | 3 | ![GitHub license](https://img.shields.io/github/license/oussamabonnor1/SimpleCalculator-WPF.svg) 4 | ![Jetlight studio](https://img.shields.io/badge/Made%20by-Jetlight%20studio-blue.svg?color=082544) 5 | 6 | ## Screenshots and GIFs: 7 | 8 | 9 | 10 | ## Project logic: 11 | The use of vertices specified from the cursor's coordinates clicks to dynamically generate and configure a mesh, rigidbody2D, color, and 2D collider. 12 | 13 | ## Project Overview 14 | Requires Unity3D (tested with 2018.x, but should also work with 2017.x & 5.x) 15 | 16 | ``` 17 | . 18 | ├── _Materials 19 | | └── Line color.mat - The color of the line drawn when displaying the current shape (before creation). 20 | ├── _Scenes 21 | | └── Main.unity - The project's main scene 22 | └── Scripts 23 | ├── GameManager.cs - The main code of creation and interaction. 24 | └── Traingulator.cs - Generates triangles from polygon vertecies. 25 | ``` 26 | 27 | ## Running the Project 28 | To run the project, open _Scenes/Main.unity and click on the play button. 29 | 30 | ## How to use it: 31 | Click anywhere on the screen and draw a shape using multiples left mouse button clicks, once done click on the right mouse button to generate the shape and enjoy the physics! (Be creative). 32 | 33 | ## Tools used: 34 | * Visual studio (IDE) 35 | * C# (logic) 36 | * Unity (game engine) 37 | 38 | ## Contribution: 39 | Feel free to `fork` this project and add whatever you like. If you have any suggestions or any comments please feel free to contact me or to open an issue, use free license art assets please. 40 | 41 | ## Team: 42 | [Jetlighters](https://github.com/JetLightStudio) having fun. 43 | --------------------------------------------------------------------------------