├── .gitignore ├── Assets ├── Materials.meta ├── Materials │ ├── BlueMat.mat │ ├── BlueMat.mat.meta │ ├── DarkMat.mat │ ├── DarkMat.mat.meta │ ├── GreenMat.mat │ ├── GreenMat.mat.meta │ ├── WhiteMat.mat │ └── WhiteMat.mat.meta ├── Models.meta ├── Models │ ├── Level.prefab │ ├── Level.prefab.meta │ ├── pb_Mesh-953556.asset │ └── pb_Mesh-953556.asset.meta ├── Scenes.meta ├── Scenes │ ├── SampleScene.meta │ └── SampleScene │ │ ├── SampleScene.unity │ │ └── SampleScene.unity.meta ├── Scripts.meta └── Scripts │ ├── Example.meta │ ├── Example │ ├── CapsuleScript.cs │ ├── CapsuleScript.cs.meta │ ├── CubeScript.cs │ ├── CubeScript.cs.meta │ ├── CylinderScript.cs │ ├── CylinderScript.cs.meta │ ├── SphereScript.cs │ └── SphereScript.cs.meta │ ├── NullReferenceDetection.meta │ └── NullReferenceDetection │ ├── Attributes.meta │ ├── Attributes │ ├── BaseAttribute.cs │ ├── BaseAttribute.cs.meta │ ├── ValueOptional.cs │ ├── ValueOptional.cs.meta │ ├── ValueRequired.cs │ └── ValueRequired.cs.meta │ ├── BlacklistItem.cs │ ├── BlacklistItem.cs.meta │ ├── Editor.meta │ ├── Editor │ ├── CompileTimeCheck.cs │ ├── CompileTimeCheck.cs.meta │ ├── ExecuteFindNullReferences.cs │ ├── ExecuteFindNullReferences.cs.meta │ ├── FindNullReferencesPreferences.cs │ ├── FindNullReferencesPreferences.cs.meta │ ├── PersistableAttribute.cs │ ├── PersistableAttribute.cs.meta │ ├── PersistableBoolean.cs │ ├── PersistableBoolean.cs.meta │ ├── PlayModeCheck.cs │ ├── PlayModeCheck.cs.meta │ ├── PreferencesSerialization.cs │ ├── PreferencesSerialization.cs.meta │ ├── PreferencesStorage.cs │ └── PreferencesStorage.cs.meta │ ├── ExtensionMethods.cs │ ├── ExtensionMethods.cs.meta │ ├── NullReference.cs │ ├── NullReference.cs.meta │ ├── NullReferenceDetector.cs │ └── NullReferenceDetector.cs.meta ├── Documentation ├── screenshot.png ├── settings_screen.png ├── settings_screen_ignore.png └── settings_screen_prefabs.png ├── LICENSE ├── NullReferenceDetector.IgnoreList ├── NullReferenceDetector.PrefabList ├── 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 └── null-reference-detection.unitypackage /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | .idea/ 7 | Assets/AssetStoreTools* 8 | Logs/ 9 | 10 | # Visual Studio cache directory 11 | .vs/ 12 | 13 | # Autogenerated VS/MD/Consulo solution and project files 14 | ExportedObj/ 15 | .consulo/ 16 | *.csproj 17 | *.unityproj 18 | *.sln 19 | *.suo 20 | *.tmp 21 | *.user 22 | *.userprefs 23 | *.pidb 24 | *.booproj 25 | *.svd 26 | *.pdb 27 | *.opendb 28 | 29 | # Unity3D generated meta files 30 | *.pidb.meta 31 | *.pdb.meta 32 | 33 | # Unity3D Generated File On Crash Reports 34 | sysinfo.txt 35 | 36 | # Builds 37 | *.apk 38 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb898cf9f096ef2479311d913a49c620 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/BlueMat.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: BlueMat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, 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.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: 0, g: 0.9703219, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/BlueMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbc1cc9beaa7ad94c8b85f5e8191a211 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/DarkMat.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: DarkMat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, 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.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: 0.5660378, g: 0.5660378, b: 0.5660378, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/DarkMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a3ae5ffaeca57a438bcff0ffffbb0db 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/GreenMat.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: GreenMat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, 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.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: 0, g: 1, b: 0.41347384, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/GreenMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8b05d95c8e4cd34aa238863d8a76dcf 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/WhiteMat.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: WhiteMat 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, 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.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/WhiteMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6254a69c52170b469f85866d5c1e2e2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33f90684de21ca14293c4e75760015ab 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/Level.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_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1446508006793590} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1446508006793590 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 4098385214528784} 22 | - component: {fileID: 33280429763756332} 23 | - component: {fileID: 23064539675692752} 24 | m_Layer: 0 25 | m_Name: Level 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4098385214528784 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1446508006793590} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!23 &23064539675692752 45 | MeshRenderer: 46 | m_ObjectHideFlags: 1 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1446508006793590} 50 | m_Enabled: 1 51 | m_CastShadows: 1 52 | m_ReceiveShadows: 1 53 | m_DynamicOccludee: 1 54 | m_MotionVectors: 1 55 | m_LightProbeUsage: 1 56 | m_ReflectionProbeUsage: 1 57 | m_RenderingLayerMask: 4294967295 58 | m_Materials: 59 | - {fileID: 2100000, guid: a6254a69c52170b469f85866d5c1e2e2, type: 2} 60 | - {fileID: 2100000, guid: 1a3ae5ffaeca57a438bcff0ffffbb0db, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_PreserveUVs: 0 69 | m_IgnoreNormalsForChartDetection: 0 70 | m_ImportantGI: 0 71 | m_StitchLightmapSeams: 0 72 | m_SelectedEditorRenderState: 3 73 | m_MinimumChartSize: 4 74 | m_AutoUVMaxDistance: 0.5 75 | m_AutoUVMaxAngle: 89 76 | m_LightmapParameters: {fileID: 0} 77 | m_SortingLayerID: 0 78 | m_SortingLayer: 0 79 | m_SortingOrder: 0 80 | --- !u!33 &33280429763756332 81 | MeshFilter: 82 | m_ObjectHideFlags: 1 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | m_GameObject: {fileID: 1446508006793590} 86 | m_Mesh: {fileID: 4300000, guid: cf12d8a3cfb317c488310b4e51c53624, type: 2} 87 | -------------------------------------------------------------------------------- /Assets/Models/Level.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e06dd4cd2bf00e7459c3353dff7d351b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/pb_Mesh-953556.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!43 &4300000 4 | Mesh: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: pb_Mesh-953556 9 | serializedVersion: 9 10 | m_SubMeshes: 11 | - serializedVersion: 2 12 | firstByte: 0 13 | indexCount: 24 14 | topology: 0 15 | baseVertex: 0 16 | firstVertex: 0 17 | vertexCount: 16 18 | localAABB: 19 | m_Center: {x: 1, y: -1.125, z: -1} 20 | m_Extent: {x: 1, y: 2.125, z: 1} 21 | - serializedVersion: 2 22 | firstByte: 48 23 | indexCount: 6 24 | topology: 0 25 | baseVertex: 0 26 | firstVertex: 16 27 | vertexCount: 4 28 | localAABB: 29 | m_Center: {x: 1, y: 1, z: -1} 30 | m_Extent: {x: 1, y: 0, z: 1} 31 | m_Shapes: 32 | vertices: [] 33 | shapes: [] 34 | channels: [] 35 | fullWeights: [] 36 | m_BindPose: [] 37 | m_BoneNameHashes: 38 | m_RootBoneNameHash: 0 39 | m_MeshCompression: 0 40 | m_IsReadable: 1 41 | m_KeepVertices: 1 42 | m_KeepIndices: 1 43 | m_IndexFormat: 0 44 | m_IndexBuffer: 000001000200010003000200040005000600050007000600080009000a0009000b000a000c000d000e000d000f000e00100011001200110013001200 45 | m_VertexData: 46 | serializedVersion: 2 47 | m_VertexCount: 20 48 | m_Channels: 49 | - stream: 0 50 | offset: 0 51 | format: 0 52 | dimension: 3 53 | - stream: 0 54 | offset: 12 55 | format: 0 56 | dimension: 3 57 | - stream: 0 58 | offset: 24 59 | format: 0 60 | dimension: 4 61 | - stream: 0 62 | offset: 40 63 | format: 0 64 | dimension: 4 65 | - stream: 0 66 | offset: 56 67 | format: 0 68 | dimension: 2 69 | - stream: 0 70 | offset: 64 71 | format: 0 72 | dimension: 2 73 | - stream: 0 74 | offset: 0 75 | format: 0 76 | dimension: 0 77 | - stream: 0 78 | offset: 0 79 | format: 0 80 | dimension: 0 81 | - stream: 0 82 | offset: 0 83 | format: 0 84 | dimension: 0 85 | - stream: 0 86 | offset: 0 87 | format: 0 88 | dimension: 0 89 | - stream: 0 90 | offset: 0 91 | format: 0 92 | dimension: 0 93 | - stream: 0 94 | offset: 0 95 | format: 0 96 | dimension: 0 97 | - stream: 0 98 | offset: 0 99 | format: 0 100 | dimension: 0 101 | - stream: 0 102 | offset: 0 103 | format: 0 104 | dimension: 0 105 | m_DataSize: 1440 106 | _typelessdata: 00000000000050c00000000000000000000000000000803f000080bf0000000000000000000080bf0000803f0000803f0000803f0000803f00000000000050c0db71053f0968ff3e00000040000050c00000000000000000000000000000803f000080bf0000000000000000000080bf0000803f0000803f0000803f0000803f000000c0000050c0dc71053fcf043e3f000000000000803f0000000000000000000000000000803f000080bf0000000000000000000080bf0000803f0000803f0000803f0000803f000000000000803f6f12833b0968ff3e000000400000803f0000000000000000000000000000803f000080bf0000000000000000000080bf0000803f0000803f0000803f0000803f000000c00000803f2813833bcf043e3f00000040000050c0000000000000803f000000000000000000000000000000000000803f000080bf0000803f0000803f0000803f0000803f00000000000050c02813833bbf5bfd3e00000040000050c0000000c00000803f000000000000000000000000000000000000803f000080bf0000803f0000803f0000803f0000803f000000c0000050c06f12833b29ba803e000000400000803f000000000000803f000000000000000000000000000000000000803f000080bf0000803f0000803f0000803f0000803f000000000000803fdc71053fbf5bfd3e000000400000803f000000c00000803f000000000000000000000000000000000000803f000080bf0000803f0000803f0000803f0000803f000000c00000803fdb71053f29ba803e00000040000050c0000000c00000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f0000803f0000803f00000040000050c02813833bbf5b7d3f00000000000050c0000000c00000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f0000803f0000803f00000000000050c06f12833bf40a3f3f000000400000803f000000c00000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f0000803f0000803f000000400000803fdc71053fbf5b7d3f000000000000803f000000c00000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f0000803f0000803f000000000000803fdb71053ff40a3f3f00000000000050c0000000c0000080bf00000000000000000000000000000000000080bf000080bf0000803f0000803f0000803f0000803f00000040000050c0db71053f6f12833b00000000000050c000000000000080bf00000000000000000000000000000000000080bf000080bf0000803f0000803f0000803f0000803f00000000000050c0dc71053fbf5b7d3e000000000000803f000000c0000080bf00000000000000000000000000000000000080bf000080bf0000803f0000803f0000803f0000803f000000400000803f6f12833b6f12833b000000000000803f00000000000080bf00000000000000000000000000000000000080bf000080bf0000803f0000803f0000803f0000803f000000000000803f2813833bbf5b7d3e000000000000803f00000000000000000000803f000000000000803f0000000000000000000080bf0000803f0000803f0000803f0000803f0000000000000000cec8443f1e14833b000000400000803f00000000000000000000803f000000000000803f0000000000000000000080bf0000803f0000803f0000803f0000803f0000004000000000cbc8443fe15b7d3e000000000000803f000000c0000000000000803f000000000000803f0000000000000000000080bf0000803f0000803f0000803f0000803f00000000000000c00578063f6f12833b000000400000803f000000c0000000000000803f000000000000803f0000000000000000000080bf0000803f0000803f0000803f0000803f00000040000000c00178063fd45b7d3e 107 | m_CompressedMesh: 108 | m_Vertices: 109 | m_NumItems: 0 110 | m_Range: 0 111 | m_Start: 0 112 | m_Data: 113 | m_BitSize: 0 114 | m_UV: 115 | m_NumItems: 0 116 | m_Range: 0 117 | m_Start: 0 118 | m_Data: 119 | m_BitSize: 0 120 | m_Normals: 121 | m_NumItems: 0 122 | m_Range: 0 123 | m_Start: 0 124 | m_Data: 125 | m_BitSize: 0 126 | m_Tangents: 127 | m_NumItems: 0 128 | m_Range: 0 129 | m_Start: 0 130 | m_Data: 131 | m_BitSize: 0 132 | m_Weights: 133 | m_NumItems: 0 134 | m_Data: 135 | m_BitSize: 0 136 | m_NormalSigns: 137 | m_NumItems: 0 138 | m_Data: 139 | m_BitSize: 0 140 | m_TangentSigns: 141 | m_NumItems: 0 142 | m_Data: 143 | m_BitSize: 0 144 | m_FloatColors: 145 | m_NumItems: 0 146 | m_Range: 0 147 | m_Start: 0 148 | m_Data: 149 | m_BitSize: 0 150 | m_BoneIndices: 151 | m_NumItems: 0 152 | m_Data: 153 | m_BitSize: 0 154 | m_Triangles: 155 | m_NumItems: 0 156 | m_Data: 157 | m_BitSize: 0 158 | m_UVInfo: 0 159 | m_LocalAABB: 160 | m_Center: {x: 1, y: -1.125, z: -1} 161 | m_Extent: {x: 1, y: 2.125, z: 1} 162 | m_MeshUsageFlags: 0 163 | m_BakedConvexCollisionMesh: 164 | m_BakedTriangleCollisionMesh: 165 | m_MeshMetrics[0]: 1 166 | m_MeshMetrics[1]: 1 167 | m_MeshOptimized: 0 168 | -------------------------------------------------------------------------------- /Assets/Models/pb_Mesh-953556.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf12d8a3cfb317c488310b4e51c53624 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f93a48c4d843a4d48b8e4c06b36ae56b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 50 60 | m_AtlasSize: 1024 61 | m_AO: 1 62 | m_AOMaxDistance: 0.5 63 | m_CompAOExponent: 2.52 64 | m_CompAOExponentDirect: 1.23 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 4 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 0 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 256 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 48515032} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 3 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | buildHeightMesh: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!850595691 &48515032 127 | LightingSettings: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | m_Name: Settings.lighting 133 | serializedVersion: 6 134 | m_GIWorkflowMode: 0 135 | m_EnableBakedLightmaps: 1 136 | m_EnableRealtimeLightmaps: 0 137 | m_RealtimeEnvironmentLighting: 1 138 | m_BounceScale: 1 139 | m_AlbedoBoost: 1 140 | m_IndirectOutputScale: 1 141 | m_UsingShadowmask: 1 142 | m_BakeBackend: 1 143 | m_LightmapMaxSize: 1024 144 | m_BakeResolution: 50 145 | m_Padding: 4 146 | m_LightmapCompression: 0 147 | m_AO: 1 148 | m_AOMaxDistance: 0.5 149 | m_CompAOExponent: 2.52 150 | m_CompAOExponentDirect: 1.23 151 | m_ExtractAO: 0 152 | m_MixedBakeMode: 2 153 | m_LightmapsBakeMode: 1 154 | m_FilterMode: 1 155 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} 156 | m_ExportTrainingData: 0 157 | m_TrainingDataDestination: TrainingData 158 | m_RealtimeResolution: 2 159 | m_ForceWhiteAlbedo: 0 160 | m_ForceUpdates: 0 161 | m_FinalGather: 0 162 | m_FinalGatherRayCount: 256 163 | m_FinalGatherFiltering: 1 164 | m_PVRCulling: 1 165 | m_PVRSampling: 1 166 | m_PVRDirectSampleCount: 32 167 | m_PVRSampleCount: 256 168 | m_PVREnvironmentSampleCount: 256 169 | m_PVREnvironmentReferencePointCount: 2048 170 | m_LightProbeSampleCountMultiplier: 4 171 | m_PVRBounces: 2 172 | m_PVRMinBounces: 2 173 | m_PVREnvironmentImportanceSampling: 0 174 | m_PVRFilteringMode: 2 175 | m_PVRDenoiserTypeDirect: 0 176 | m_PVRDenoiserTypeIndirect: 0 177 | m_PVRDenoiserTypeAO: 0 178 | m_PVRFilterTypeDirect: 0 179 | m_PVRFilterTypeIndirect: 0 180 | m_PVRFilterTypeAO: 0 181 | m_PVRFilteringGaussRadiusDirect: 1 182 | m_PVRFilteringGaussRadiusIndirect: 5 183 | m_PVRFilteringGaussRadiusAO: 2 184 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 185 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 186 | m_PVRFilteringAtrousPositionSigmaAO: 1 187 | m_PVRTiledBaking: 0 188 | m_NumRaysToShootPerTexel: -1 189 | m_RespectSceneVisibilityWhenBakingGI: 0 190 | --- !u!1 &53833991 191 | GameObject: 192 | m_ObjectHideFlags: 0 193 | m_CorrespondingSourceObject: {fileID: 0} 194 | m_PrefabInstance: {fileID: 0} 195 | m_PrefabAsset: {fileID: 0} 196 | serializedVersion: 6 197 | m_Component: 198 | - component: {fileID: 53833993} 199 | - component: {fileID: 53833992} 200 | m_Layer: 0 201 | m_Name: Light_Right 202 | m_TagString: Untagged 203 | m_Icon: {fileID: 0} 204 | m_NavMeshLayer: 0 205 | m_StaticEditorFlags: 0 206 | m_IsActive: 1 207 | --- !u!108 &53833992 208 | Light: 209 | m_ObjectHideFlags: 0 210 | m_CorrespondingSourceObject: {fileID: 0} 211 | m_PrefabInstance: {fileID: 0} 212 | m_PrefabAsset: {fileID: 0} 213 | m_GameObject: {fileID: 53833991} 214 | m_Enabled: 1 215 | serializedVersion: 10 216 | m_Type: 2 217 | m_Shape: 0 218 | m_Color: {r: 1, g: 1, b: 1, a: 1} 219 | m_Intensity: 1 220 | m_Range: 10 221 | m_SpotAngle: 30 222 | m_InnerSpotAngle: 21.80208 223 | m_CookieSize: 10 224 | m_Shadows: 225 | m_Type: 0 226 | m_Resolution: -1 227 | m_CustomResolution: -1 228 | m_Strength: 1 229 | m_Bias: 0.05 230 | m_NormalBias: 0.4 231 | m_NearPlane: 0.2 232 | m_CullingMatrixOverride: 233 | e00: 1 234 | e01: 0 235 | e02: 0 236 | e03: 0 237 | e10: 0 238 | e11: 1 239 | e12: 0 240 | e13: 0 241 | e20: 0 242 | e21: 0 243 | e22: 1 244 | e23: 0 245 | e30: 0 246 | e31: 0 247 | e32: 0 248 | e33: 1 249 | m_UseCullingMatrixOverride: 0 250 | m_Cookie: {fileID: 0} 251 | m_DrawHalo: 0 252 | m_Flare: {fileID: 0} 253 | m_RenderMode: 0 254 | m_CullingMask: 255 | serializedVersion: 2 256 | m_Bits: 4294967295 257 | m_RenderingLayerMask: 1 258 | m_Lightmapping: 2 259 | m_LightShadowCasterMode: 0 260 | m_AreaSize: {x: 1, y: 1} 261 | m_BounceIntensity: 1 262 | m_ColorTemperature: 6570 263 | m_UseColorTemperature: 0 264 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 265 | m_UseBoundingSphereOverride: 0 266 | m_UseViewFrustumForShadowCasterCull: 1 267 | m_ShadowRadius: 0 268 | m_ShadowAngle: 0 269 | --- !u!4 &53833993 270 | Transform: 271 | m_ObjectHideFlags: 0 272 | m_CorrespondingSourceObject: {fileID: 0} 273 | m_PrefabInstance: {fileID: 0} 274 | m_PrefabAsset: {fileID: 0} 275 | m_GameObject: {fileID: 53833991} 276 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 277 | m_LocalPosition: {x: -2.9375, y: 4.75, z: 5.3125} 278 | m_LocalScale: {x: 1, y: 1, z: 1} 279 | m_ConstrainProportionsScale: 0 280 | m_Children: [] 281 | m_Father: {fileID: 0} 282 | m_RootOrder: 1 283 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 284 | --- !u!1 &282840810 285 | GameObject: 286 | m_ObjectHideFlags: 0 287 | m_CorrespondingSourceObject: {fileID: 0} 288 | m_PrefabInstance: {fileID: 0} 289 | m_PrefabAsset: {fileID: 0} 290 | serializedVersion: 6 291 | m_Component: 292 | - component: {fileID: 282840814} 293 | - component: {fileID: 282840813} 294 | - component: {fileID: 282840811} 295 | m_Layer: 0 296 | m_Name: Main Camera 297 | m_TagString: MainCamera 298 | m_Icon: {fileID: 0} 299 | m_NavMeshLayer: 0 300 | m_StaticEditorFlags: 0 301 | m_IsActive: 1 302 | --- !u!81 &282840811 303 | AudioListener: 304 | m_ObjectHideFlags: 0 305 | m_CorrespondingSourceObject: {fileID: 0} 306 | m_PrefabInstance: {fileID: 0} 307 | m_PrefabAsset: {fileID: 0} 308 | m_GameObject: {fileID: 282840810} 309 | m_Enabled: 1 310 | --- !u!20 &282840813 311 | Camera: 312 | m_ObjectHideFlags: 0 313 | m_CorrespondingSourceObject: {fileID: 0} 314 | m_PrefabInstance: {fileID: 0} 315 | m_PrefabAsset: {fileID: 0} 316 | m_GameObject: {fileID: 282840810} 317 | m_Enabled: 1 318 | serializedVersion: 2 319 | m_ClearFlags: 2 320 | m_BackGroundColor: {r: 0.24528301, g: 0.24528301, b: 0.24528301, a: 0} 321 | m_projectionMatrixMode: 1 322 | m_GateFitMode: 2 323 | m_FOVAxisMode: 0 324 | m_Iso: 200 325 | m_ShutterSpeed: 0.005 326 | m_Aperture: 16 327 | m_FocusDistance: 10 328 | m_FocalLength: 50 329 | m_BladeCount: 5 330 | m_Curvature: {x: 2, y: 11} 331 | m_BarrelClipping: 0.25 332 | m_Anamorphism: 0 333 | m_SensorSize: {x: 36, y: 24} 334 | m_LensShift: {x: 0, y: 0} 335 | m_NormalizedViewPortRect: 336 | serializedVersion: 2 337 | x: 0 338 | y: 0 339 | width: 1 340 | height: 1 341 | near clip plane: 0.3 342 | far clip plane: 1000 343 | field of view: 60 344 | orthographic: 1 345 | orthographic size: 2.53 346 | m_Depth: -1 347 | m_CullingMask: 348 | serializedVersion: 2 349 | m_Bits: 4294967295 350 | m_RenderingPath: -1 351 | m_TargetTexture: {fileID: 0} 352 | m_TargetDisplay: 0 353 | m_TargetEye: 3 354 | m_HDR: 1 355 | m_AllowMSAA: 1 356 | m_AllowDynamicResolution: 0 357 | m_ForceIntoRT: 1 358 | m_OcclusionCulling: 1 359 | m_StereoConvergence: 10 360 | m_StereoSeparation: 0.022 361 | --- !u!4 &282840814 362 | Transform: 363 | m_ObjectHideFlags: 0 364 | m_CorrespondingSourceObject: {fileID: 0} 365 | m_PrefabInstance: {fileID: 0} 366 | m_PrefabAsset: {fileID: 0} 367 | m_GameObject: {fileID: 282840810} 368 | m_LocalRotation: {x: -0.16090718, y: 0.38225245, z: -0.067780234, w: -0.9074127} 369 | m_LocalPosition: {x: 0.35263252, y: 5.3472376, z: -1.3103313} 370 | m_LocalScale: {x: 1, y: 1, z: 1} 371 | m_ConstrainProportionsScale: 0 372 | m_Children: [] 373 | m_Father: {fileID: 0} 374 | m_RootOrder: 0 375 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 376 | --- !u!1 &764717962 377 | GameObject: 378 | m_ObjectHideFlags: 0 379 | m_CorrespondingSourceObject: {fileID: 0} 380 | m_PrefabInstance: {fileID: 0} 381 | m_PrefabAsset: {fileID: 0} 382 | serializedVersion: 6 383 | m_Component: 384 | - component: {fileID: 764717966} 385 | - component: {fileID: 764717965} 386 | - component: {fileID: 764717964} 387 | - component: {fileID: 764717963} 388 | - component: {fileID: 764717967} 389 | m_Layer: 0 390 | m_Name: Capsule 391 | m_TagString: Untagged 392 | m_Icon: {fileID: 0} 393 | m_NavMeshLayer: 0 394 | m_StaticEditorFlags: 4294967295 395 | m_IsActive: 1 396 | --- !u!136 &764717963 397 | CapsuleCollider: 398 | m_ObjectHideFlags: 0 399 | m_CorrespondingSourceObject: {fileID: 0} 400 | m_PrefabInstance: {fileID: 0} 401 | m_PrefabAsset: {fileID: 0} 402 | m_GameObject: {fileID: 764717962} 403 | m_Material: {fileID: 0} 404 | m_IncludeLayers: 405 | serializedVersion: 2 406 | m_Bits: 0 407 | m_ExcludeLayers: 408 | serializedVersion: 2 409 | m_Bits: 0 410 | m_LayerOverridePriority: 0 411 | m_IsTrigger: 0 412 | m_ProvidesContacts: 0 413 | m_Enabled: 1 414 | serializedVersion: 2 415 | m_Radius: 0.5 416 | m_Height: 2 417 | m_Direction: 1 418 | m_Center: {x: 0, y: 0, z: 0} 419 | --- !u!23 &764717964 420 | MeshRenderer: 421 | m_ObjectHideFlags: 0 422 | m_CorrespondingSourceObject: {fileID: 0} 423 | m_PrefabInstance: {fileID: 0} 424 | m_PrefabAsset: {fileID: 0} 425 | m_GameObject: {fileID: 764717962} 426 | m_Enabled: 1 427 | m_CastShadows: 1 428 | m_ReceiveShadows: 1 429 | m_DynamicOccludee: 1 430 | m_StaticShadowCaster: 0 431 | m_MotionVectors: 1 432 | m_LightProbeUsage: 1 433 | m_ReflectionProbeUsage: 1 434 | m_RayTracingMode: 2 435 | m_RayTraceProcedural: 0 436 | m_RenderingLayerMask: 4294967295 437 | m_RendererPriority: 0 438 | m_Materials: 439 | - {fileID: 2100000, guid: cbc1cc9beaa7ad94c8b85f5e8191a211, type: 2} 440 | m_StaticBatchInfo: 441 | firstSubMesh: 0 442 | subMeshCount: 0 443 | m_StaticBatchRoot: {fileID: 0} 444 | m_ProbeAnchor: {fileID: 0} 445 | m_LightProbeVolumeOverride: {fileID: 0} 446 | m_ScaleInLightmap: 1 447 | m_ReceiveGI: 1 448 | m_PreserveUVs: 0 449 | m_IgnoreNormalsForChartDetection: 0 450 | m_ImportantGI: 0 451 | m_StitchLightmapSeams: 0 452 | m_SelectedEditorRenderState: 3 453 | m_MinimumChartSize: 4 454 | m_AutoUVMaxDistance: 0.5 455 | m_AutoUVMaxAngle: 89 456 | m_LightmapParameters: {fileID: 0} 457 | m_SortingLayerID: 0 458 | m_SortingLayer: 0 459 | m_SortingOrder: 0 460 | m_AdditionalVertexStreams: {fileID: 0} 461 | --- !u!33 &764717965 462 | MeshFilter: 463 | m_ObjectHideFlags: 0 464 | m_CorrespondingSourceObject: {fileID: 0} 465 | m_PrefabInstance: {fileID: 0} 466 | m_PrefabAsset: {fileID: 0} 467 | m_GameObject: {fileID: 764717962} 468 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 469 | --- !u!4 &764717966 470 | Transform: 471 | m_ObjectHideFlags: 0 472 | m_CorrespondingSourceObject: {fileID: 0} 473 | m_PrefabInstance: {fileID: 0} 474 | m_PrefabAsset: {fileID: 0} 475 | m_GameObject: {fileID: 764717962} 476 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 477 | m_LocalPosition: {x: -0.5299921, y: 1.9083829, z: 0.32827353} 478 | m_LocalScale: {x: 0.27168593, y: 0.21285777, z: 0.27168593} 479 | m_ConstrainProportionsScale: 0 480 | m_Children: [] 481 | m_Father: {fileID: 1840631179} 482 | m_RootOrder: 2 483 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 484 | --- !u!114 &764717967 485 | MonoBehaviour: 486 | m_ObjectHideFlags: 0 487 | m_CorrespondingSourceObject: {fileID: 0} 488 | m_PrefabInstance: {fileID: 0} 489 | m_PrefabAsset: {fileID: 0} 490 | m_GameObject: {fileID: 764717962} 491 | m_Enabled: 1 492 | m_EditorHideFlags: 0 493 | m_Script: {fileID: 11500000, guid: 229624d14d7b7ae41bd689e02acf947b, type: 3} 494 | m_Name: 495 | m_EditorClassIdentifier: 496 | --- !u!1 &1432409438 497 | GameObject: 498 | m_ObjectHideFlags: 0 499 | m_CorrespondingSourceObject: {fileID: 0} 500 | m_PrefabInstance: {fileID: 0} 501 | m_PrefabAsset: {fileID: 0} 502 | serializedVersion: 6 503 | m_Component: 504 | - component: {fileID: 1432409442} 505 | - component: {fileID: 1432409441} 506 | - component: {fileID: 1432409440} 507 | - component: {fileID: 1432409439} 508 | m_Layer: 0 509 | m_Name: Sphere 510 | m_TagString: Untagged 511 | m_Icon: {fileID: 0} 512 | m_NavMeshLayer: 0 513 | m_StaticEditorFlags: 4294967295 514 | m_IsActive: 1 515 | --- !u!114 &1432409439 516 | MonoBehaviour: 517 | m_ObjectHideFlags: 0 518 | m_CorrespondingSourceObject: {fileID: 0} 519 | m_PrefabInstance: {fileID: 0} 520 | m_PrefabAsset: {fileID: 0} 521 | m_GameObject: {fileID: 1432409438} 522 | m_Enabled: 1 523 | m_EditorHideFlags: 0 524 | m_Script: {fileID: 11500000, guid: 9f015692444b5c34f9f927ad0272a928, type: 3} 525 | m_Name: 526 | m_EditorClassIdentifier: 527 | --- !u!23 &1432409440 528 | MeshRenderer: 529 | m_ObjectHideFlags: 0 530 | m_CorrespondingSourceObject: {fileID: 0} 531 | m_PrefabInstance: {fileID: 0} 532 | m_PrefabAsset: {fileID: 0} 533 | m_GameObject: {fileID: 1432409438} 534 | m_Enabled: 1 535 | m_CastShadows: 1 536 | m_ReceiveShadows: 1 537 | m_DynamicOccludee: 1 538 | m_StaticShadowCaster: 0 539 | m_MotionVectors: 1 540 | m_LightProbeUsage: 1 541 | m_ReflectionProbeUsage: 1 542 | m_RayTracingMode: 2 543 | m_RayTraceProcedural: 0 544 | m_RenderingLayerMask: 4294967295 545 | m_RendererPriority: 0 546 | m_Materials: 547 | - {fileID: 2100000, guid: cbc1cc9beaa7ad94c8b85f5e8191a211, type: 2} 548 | m_StaticBatchInfo: 549 | firstSubMesh: 0 550 | subMeshCount: 0 551 | m_StaticBatchRoot: {fileID: 0} 552 | m_ProbeAnchor: {fileID: 0} 553 | m_LightProbeVolumeOverride: {fileID: 0} 554 | m_ScaleInLightmap: 2 555 | m_ReceiveGI: 1 556 | m_PreserveUVs: 0 557 | m_IgnoreNormalsForChartDetection: 0 558 | m_ImportantGI: 0 559 | m_StitchLightmapSeams: 0 560 | m_SelectedEditorRenderState: 3 561 | m_MinimumChartSize: 4 562 | m_AutoUVMaxDistance: 0.5 563 | m_AutoUVMaxAngle: 89 564 | m_LightmapParameters: {fileID: 0} 565 | m_SortingLayerID: 0 566 | m_SortingLayer: 0 567 | m_SortingOrder: 0 568 | m_AdditionalVertexStreams: {fileID: 0} 569 | --- !u!33 &1432409441 570 | MeshFilter: 571 | m_ObjectHideFlags: 0 572 | m_CorrespondingSourceObject: {fileID: 0} 573 | m_PrefabInstance: {fileID: 0} 574 | m_PrefabAsset: {fileID: 0} 575 | m_GameObject: {fileID: 1432409438} 576 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 577 | --- !u!4 &1432409442 578 | Transform: 579 | m_ObjectHideFlags: 0 580 | m_CorrespondingSourceObject: {fileID: 0} 581 | m_PrefabInstance: {fileID: 0} 582 | m_PrefabAsset: {fileID: 0} 583 | m_GameObject: {fileID: 1432409438} 584 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 585 | m_LocalPosition: {x: -0.4794922, y: 1.9423828, z: -1.0322266} 586 | m_LocalScale: {x: 0.4375, y: 0.4375, z: 0.4375} 587 | m_ConstrainProportionsScale: 0 588 | m_Children: [] 589 | m_Father: {fileID: 1840631179} 590 | m_RootOrder: 1 591 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 592 | --- !u!1 &1484670275 593 | GameObject: 594 | m_ObjectHideFlags: 0 595 | m_CorrespondingSourceObject: {fileID: 0} 596 | m_PrefabInstance: {fileID: 0} 597 | m_PrefabAsset: {fileID: 0} 598 | serializedVersion: 6 599 | m_Component: 600 | - component: {fileID: 1484670277} 601 | - component: {fileID: 1484670276} 602 | m_Layer: 0 603 | m_Name: Light_Left 604 | m_TagString: Untagged 605 | m_Icon: {fileID: 0} 606 | m_NavMeshLayer: 0 607 | m_StaticEditorFlags: 0 608 | m_IsActive: 1 609 | --- !u!108 &1484670276 610 | Light: 611 | m_ObjectHideFlags: 0 612 | m_CorrespondingSourceObject: {fileID: 0} 613 | m_PrefabInstance: {fileID: 0} 614 | m_PrefabAsset: {fileID: 0} 615 | m_GameObject: {fileID: 1484670275} 616 | m_Enabled: 1 617 | serializedVersion: 10 618 | m_Type: 2 619 | m_Shape: 0 620 | m_Color: {r: 1, g: 1, b: 1, a: 1} 621 | m_Intensity: 1 622 | m_Range: 10 623 | m_SpotAngle: 30 624 | m_InnerSpotAngle: 21.80208 625 | m_CookieSize: 10 626 | m_Shadows: 627 | m_Type: 0 628 | m_Resolution: -1 629 | m_CustomResolution: -1 630 | m_Strength: 1 631 | m_Bias: 0.05 632 | m_NormalBias: 0.4 633 | m_NearPlane: 0.2 634 | m_CullingMatrixOverride: 635 | e00: 1 636 | e01: 0 637 | e02: 0 638 | e03: 0 639 | e10: 0 640 | e11: 1 641 | e12: 0 642 | e13: 0 643 | e20: 0 644 | e21: 0 645 | e22: 1 646 | e23: 0 647 | e30: 0 648 | e31: 0 649 | e32: 0 650 | e33: 1 651 | m_UseCullingMatrixOverride: 0 652 | m_Cookie: {fileID: 0} 653 | m_DrawHalo: 0 654 | m_Flare: {fileID: 0} 655 | m_RenderMode: 0 656 | m_CullingMask: 657 | serializedVersion: 2 658 | m_Bits: 4294967295 659 | m_RenderingLayerMask: 1 660 | m_Lightmapping: 2 661 | m_LightShadowCasterMode: 0 662 | m_AreaSize: {x: 1, y: 1} 663 | m_BounceIntensity: 1 664 | m_ColorTemperature: 6570 665 | m_UseColorTemperature: 0 666 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 667 | m_UseBoundingSphereOverride: 0 668 | m_UseViewFrustumForShadowCasterCull: 1 669 | m_ShadowRadius: 0 670 | m_ShadowAngle: 0 671 | --- !u!4 &1484670277 672 | Transform: 673 | m_ObjectHideFlags: 0 674 | m_CorrespondingSourceObject: {fileID: 0} 675 | m_PrefabInstance: {fileID: 0} 676 | m_PrefabAsset: {fileID: 0} 677 | m_GameObject: {fileID: 1484670275} 678 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 679 | m_LocalPosition: {x: -6.625, y: 4.25, z: 0.625} 680 | m_LocalScale: {x: 1, y: 1, z: 1} 681 | m_ConstrainProportionsScale: 0 682 | m_Children: [] 683 | m_Father: {fileID: 0} 684 | m_RootOrder: 2 685 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 686 | --- !u!1 &1492840555 687 | GameObject: 688 | m_ObjectHideFlags: 0 689 | m_CorrespondingSourceObject: {fileID: 0} 690 | m_PrefabInstance: {fileID: 0} 691 | m_PrefabAsset: {fileID: 0} 692 | serializedVersion: 6 693 | m_Component: 694 | - component: {fileID: 1492840559} 695 | - component: {fileID: 1492840558} 696 | - component: {fileID: 1492840557} 697 | - component: {fileID: 1492840556} 698 | m_Layer: 0 699 | m_Name: GreenCube 700 | m_TagString: Untagged 701 | m_Icon: {fileID: 0} 702 | m_NavMeshLayer: 0 703 | m_StaticEditorFlags: 4294967295 704 | m_IsActive: 1 705 | --- !u!114 &1492840556 706 | MonoBehaviour: 707 | m_ObjectHideFlags: 0 708 | m_CorrespondingSourceObject: {fileID: 0} 709 | m_PrefabInstance: {fileID: 0} 710 | m_PrefabAsset: {fileID: 0} 711 | m_GameObject: {fileID: 1492840555} 712 | m_Enabled: 1 713 | m_EditorHideFlags: 0 714 | m_Script: {fileID: 11500000, guid: ed4876b6fb3a21b499eccbbd6a558ad6, type: 3} 715 | m_Name: 716 | m_EditorClassIdentifier: 717 | sphere: {fileID: 0} 718 | capsule: {fileID: 0} 719 | cylinder: {fileID: 0} 720 | --- !u!23 &1492840557 721 | MeshRenderer: 722 | m_ObjectHideFlags: 0 723 | m_CorrespondingSourceObject: {fileID: 0} 724 | m_PrefabInstance: {fileID: 0} 725 | m_PrefabAsset: {fileID: 0} 726 | m_GameObject: {fileID: 1492840555} 727 | m_Enabled: 1 728 | m_CastShadows: 1 729 | m_ReceiveShadows: 1 730 | m_DynamicOccludee: 1 731 | m_StaticShadowCaster: 0 732 | m_MotionVectors: 1 733 | m_LightProbeUsage: 1 734 | m_ReflectionProbeUsage: 1 735 | m_RayTracingMode: 2 736 | m_RayTraceProcedural: 0 737 | m_RenderingLayerMask: 4294967295 738 | m_RendererPriority: 0 739 | m_Materials: 740 | - {fileID: 2100000, guid: b8b05d95c8e4cd34aa238863d8a76dcf, type: 2} 741 | m_StaticBatchInfo: 742 | firstSubMesh: 0 743 | subMeshCount: 0 744 | m_StaticBatchRoot: {fileID: 0} 745 | m_ProbeAnchor: {fileID: 0} 746 | m_LightProbeVolumeOverride: {fileID: 0} 747 | m_ScaleInLightmap: 1 748 | m_ReceiveGI: 1 749 | m_PreserveUVs: 0 750 | m_IgnoreNormalsForChartDetection: 0 751 | m_ImportantGI: 0 752 | m_StitchLightmapSeams: 0 753 | m_SelectedEditorRenderState: 3 754 | m_MinimumChartSize: 4 755 | m_AutoUVMaxDistance: 0.5 756 | m_AutoUVMaxAngle: 89 757 | m_LightmapParameters: {fileID: 0} 758 | m_SortingLayerID: 0 759 | m_SortingLayer: 0 760 | m_SortingOrder: 0 761 | m_AdditionalVertexStreams: {fileID: 0} 762 | --- !u!33 &1492840558 763 | MeshFilter: 764 | m_ObjectHideFlags: 0 765 | m_CorrespondingSourceObject: {fileID: 0} 766 | m_PrefabInstance: {fileID: 0} 767 | m_PrefabAsset: {fileID: 0} 768 | m_GameObject: {fileID: 1492840555} 769 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 770 | --- !u!4 &1492840559 771 | Transform: 772 | m_ObjectHideFlags: 0 773 | m_CorrespondingSourceObject: {fileID: 0} 774 | m_PrefabInstance: {fileID: 0} 775 | m_PrefabAsset: {fileID: 0} 776 | m_GameObject: {fileID: 1492840555} 777 | m_LocalRotation: {x: -0, y: -0.18686412, z: -0, w: 0.9823858} 778 | m_LocalPosition: {x: 0.7705078, y: 1.8798828, z: -0.90722656} 779 | m_LocalScale: {x: 0.3125, y: 0.3125, z: 0.3125} 780 | m_ConstrainProportionsScale: 0 781 | m_Children: [] 782 | m_Father: {fileID: 1840631179} 783 | m_RootOrder: 0 784 | m_LocalEulerAnglesHint: {x: 0, y: -21.54, z: 0} 785 | --- !u!1 &1652265741 786 | GameObject: 787 | m_ObjectHideFlags: 0 788 | m_CorrespondingSourceObject: {fileID: 0} 789 | m_PrefabInstance: {fileID: 0} 790 | m_PrefabAsset: {fileID: 0} 791 | serializedVersion: 6 792 | m_Component: 793 | - component: {fileID: 1652265743} 794 | - component: {fileID: 1652265742} 795 | m_Layer: 0 796 | m_Name: Light_Bottom 797 | m_TagString: Untagged 798 | m_Icon: {fileID: 0} 799 | m_NavMeshLayer: 0 800 | m_StaticEditorFlags: 0 801 | m_IsActive: 1 802 | --- !u!108 &1652265742 803 | Light: 804 | m_ObjectHideFlags: 0 805 | m_CorrespondingSourceObject: {fileID: 0} 806 | m_PrefabInstance: {fileID: 0} 807 | m_PrefabAsset: {fileID: 0} 808 | m_GameObject: {fileID: 1652265741} 809 | m_Enabled: 1 810 | serializedVersion: 10 811 | m_Type: 2 812 | m_Shape: 0 813 | m_Color: {r: 0.9981192, g: 1, b: 0.9009434, a: 1} 814 | m_Intensity: 4 815 | m_Range: 5.18 816 | m_SpotAngle: 30 817 | m_InnerSpotAngle: 21.80208 818 | m_CookieSize: 10 819 | m_Shadows: 820 | m_Type: 2 821 | m_Resolution: -1 822 | m_CustomResolution: -1 823 | m_Strength: 1 824 | m_Bias: 0.05 825 | m_NormalBias: 0.4 826 | m_NearPlane: 0.2 827 | m_CullingMatrixOverride: 828 | e00: 1 829 | e01: 0 830 | e02: 0 831 | e03: 0 832 | e10: 0 833 | e11: 1 834 | e12: 0 835 | e13: 0 836 | e20: 0 837 | e21: 0 838 | e22: 1 839 | e23: 0 840 | e30: 0 841 | e31: 0 842 | e32: 0 843 | e33: 1 844 | m_UseCullingMatrixOverride: 0 845 | m_Cookie: {fileID: 0} 846 | m_DrawHalo: 0 847 | m_Flare: {fileID: 0} 848 | m_RenderMode: 0 849 | m_CullingMask: 850 | serializedVersion: 2 851 | m_Bits: 4294967295 852 | m_RenderingLayerMask: 1 853 | m_Lightmapping: 2 854 | m_LightShadowCasterMode: 0 855 | m_AreaSize: {x: 1, y: 1} 856 | m_BounceIntensity: 1 857 | m_ColorTemperature: 6570 858 | m_UseColorTemperature: 0 859 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 860 | m_UseBoundingSphereOverride: 0 861 | m_UseViewFrustumForShadowCasterCull: 1 862 | m_ShadowRadius: 0 863 | m_ShadowAngle: 0 864 | --- !u!4 &1652265743 865 | Transform: 866 | m_ObjectHideFlags: 0 867 | m_CorrespondingSourceObject: {fileID: 0} 868 | m_PrefabInstance: {fileID: 0} 869 | m_PrefabAsset: {fileID: 0} 870 | m_GameObject: {fileID: 1652265741} 871 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 872 | m_LocalPosition: {x: -2.6875, y: -1.9375, z: 1.5625} 873 | m_LocalScale: {x: 1, y: 1, z: 1} 874 | m_ConstrainProportionsScale: 0 875 | m_Children: [] 876 | m_Father: {fileID: 0} 877 | m_RootOrder: 3 878 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 879 | --- !u!1001 &1706275402 880 | PrefabInstance: 881 | m_ObjectHideFlags: 0 882 | serializedVersion: 2 883 | m_Modification: 884 | serializedVersion: 3 885 | m_TransformParent: {fileID: 0} 886 | m_Modifications: 887 | - target: {fileID: 1446508006793590, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 888 | propertyPath: m_Name 889 | value: Level 890 | objectReference: {fileID: 0} 891 | - target: {fileID: 1446508006793590, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 892 | propertyPath: m_StaticEditorFlags 893 | value: 4294967295 894 | objectReference: {fileID: 0} 895 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 896 | propertyPath: m_RootOrder 897 | value: 5 898 | objectReference: {fileID: 0} 899 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 900 | propertyPath: m_LocalPosition.x 901 | value: -5.4375 902 | objectReference: {fileID: 0} 903 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 904 | propertyPath: m_LocalPosition.y 905 | value: 2.125 906 | objectReference: {fileID: 0} 907 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 908 | propertyPath: m_LocalPosition.z 909 | value: 4.25 910 | objectReference: {fileID: 0} 911 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 912 | propertyPath: m_LocalRotation.w 913 | value: 1 914 | objectReference: {fileID: 0} 915 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 916 | propertyPath: m_LocalRotation.x 917 | value: 0 918 | objectReference: {fileID: 0} 919 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 920 | propertyPath: m_LocalRotation.y 921 | value: 0 922 | objectReference: {fileID: 0} 923 | - target: {fileID: 4098385214528784, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 924 | propertyPath: m_LocalRotation.z 925 | value: 0 926 | objectReference: {fileID: 0} 927 | m_RemovedComponents: [] 928 | m_RemovedGameObjects: [] 929 | m_AddedGameObjects: [] 930 | m_AddedComponents: [] 931 | m_SourcePrefab: {fileID: 100100000, guid: e06dd4cd2bf00e7459c3353dff7d351b, type: 3} 932 | --- !u!1 &1840631178 933 | GameObject: 934 | m_ObjectHideFlags: 0 935 | m_CorrespondingSourceObject: {fileID: 0} 936 | m_PrefabInstance: {fileID: 0} 937 | m_PrefabAsset: {fileID: 0} 938 | serializedVersion: 6 939 | m_Component: 940 | - component: {fileID: 1840631179} 941 | m_Layer: 0 942 | m_Name: Objects 943 | m_TagString: Untagged 944 | m_Icon: {fileID: 0} 945 | m_NavMeshLayer: 0 946 | m_StaticEditorFlags: 0 947 | m_IsActive: 1 948 | --- !u!4 &1840631179 949 | Transform: 950 | m_ObjectHideFlags: 0 951 | m_CorrespondingSourceObject: {fileID: 0} 952 | m_PrefabInstance: {fileID: 0} 953 | m_PrefabAsset: {fileID: 0} 954 | m_GameObject: {fileID: 1840631178} 955 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 956 | m_LocalPosition: {x: -4.583008, y: 1.4326172, z: 3.5947266} 957 | m_LocalScale: {x: 1, y: 1, z: 1} 958 | m_ConstrainProportionsScale: 0 959 | m_Children: 960 | - {fileID: 1492840559} 961 | - {fileID: 1432409442} 962 | - {fileID: 764717966} 963 | - {fileID: 2126952216} 964 | m_Father: {fileID: 0} 965 | m_RootOrder: 4 966 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 967 | --- !u!1 &2126952212 968 | GameObject: 969 | m_ObjectHideFlags: 0 970 | m_CorrespondingSourceObject: {fileID: 0} 971 | m_PrefabInstance: {fileID: 0} 972 | m_PrefabAsset: {fileID: 0} 973 | serializedVersion: 6 974 | m_Component: 975 | - component: {fileID: 2126952216} 976 | - component: {fileID: 2126952215} 977 | - component: {fileID: 2126952214} 978 | - component: {fileID: 2126952213} 979 | - component: {fileID: 2126952217} 980 | m_Layer: 0 981 | m_Name: Cylinder 982 | m_TagString: Untagged 983 | m_Icon: {fileID: 0} 984 | m_NavMeshLayer: 0 985 | m_StaticEditorFlags: 4294967295 986 | m_IsActive: 1 987 | --- !u!136 &2126952213 988 | CapsuleCollider: 989 | m_ObjectHideFlags: 0 990 | m_CorrespondingSourceObject: {fileID: 0} 991 | m_PrefabInstance: {fileID: 0} 992 | m_PrefabAsset: {fileID: 0} 993 | m_GameObject: {fileID: 2126952212} 994 | m_Material: {fileID: 0} 995 | m_IncludeLayers: 996 | serializedVersion: 2 997 | m_Bits: 0 998 | m_ExcludeLayers: 999 | serializedVersion: 2 1000 | m_Bits: 0 1001 | m_LayerOverridePriority: 0 1002 | m_IsTrigger: 0 1003 | m_ProvidesContacts: 0 1004 | m_Enabled: 1 1005 | serializedVersion: 2 1006 | m_Radius: 0.5000001 1007 | m_Height: 2 1008 | m_Direction: 1 1009 | m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697} 1010 | --- !u!23 &2126952214 1011 | MeshRenderer: 1012 | m_ObjectHideFlags: 0 1013 | m_CorrespondingSourceObject: {fileID: 0} 1014 | m_PrefabInstance: {fileID: 0} 1015 | m_PrefabAsset: {fileID: 0} 1016 | m_GameObject: {fileID: 2126952212} 1017 | m_Enabled: 1 1018 | m_CastShadows: 1 1019 | m_ReceiveShadows: 1 1020 | m_DynamicOccludee: 1 1021 | m_StaticShadowCaster: 0 1022 | m_MotionVectors: 1 1023 | m_LightProbeUsage: 1 1024 | m_ReflectionProbeUsage: 1 1025 | m_RayTracingMode: 2 1026 | m_RayTraceProcedural: 0 1027 | m_RenderingLayerMask: 4294967295 1028 | m_RendererPriority: 0 1029 | m_Materials: 1030 | - {fileID: 2100000, guid: cbc1cc9beaa7ad94c8b85f5e8191a211, type: 2} 1031 | m_StaticBatchInfo: 1032 | firstSubMesh: 0 1033 | subMeshCount: 0 1034 | m_StaticBatchRoot: {fileID: 0} 1035 | m_ProbeAnchor: {fileID: 0} 1036 | m_LightProbeVolumeOverride: {fileID: 0} 1037 | m_ScaleInLightmap: 1 1038 | m_ReceiveGI: 1 1039 | m_PreserveUVs: 0 1040 | m_IgnoreNormalsForChartDetection: 0 1041 | m_ImportantGI: 0 1042 | m_StitchLightmapSeams: 0 1043 | m_SelectedEditorRenderState: 3 1044 | m_MinimumChartSize: 4 1045 | m_AutoUVMaxDistance: 0.5 1046 | m_AutoUVMaxAngle: 89 1047 | m_LightmapParameters: {fileID: 0} 1048 | m_SortingLayerID: 0 1049 | m_SortingLayer: 0 1050 | m_SortingOrder: 0 1051 | m_AdditionalVertexStreams: {fileID: 0} 1052 | --- !u!33 &2126952215 1053 | MeshFilter: 1054 | m_ObjectHideFlags: 0 1055 | m_CorrespondingSourceObject: {fileID: 0} 1056 | m_PrefabInstance: {fileID: 0} 1057 | m_PrefabAsset: {fileID: 0} 1058 | m_GameObject: {fileID: 2126952212} 1059 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} 1060 | --- !u!4 &2126952216 1061 | Transform: 1062 | m_ObjectHideFlags: 0 1063 | m_CorrespondingSourceObject: {fileID: 0} 1064 | m_PrefabInstance: {fileID: 0} 1065 | m_PrefabAsset: {fileID: 0} 1066 | m_GameObject: {fileID: 2126952212} 1067 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1068 | m_LocalPosition: {x: 0.8380079, y: 1.8703828, z: 0.3532734} 1069 | m_LocalScale: {x: 0.30648, y: 0.1649077, z: 0.30648} 1070 | m_ConstrainProportionsScale: 0 1071 | m_Children: [] 1072 | m_Father: {fileID: 1840631179} 1073 | m_RootOrder: 3 1074 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1075 | --- !u!114 &2126952217 1076 | MonoBehaviour: 1077 | m_ObjectHideFlags: 0 1078 | m_CorrespondingSourceObject: {fileID: 0} 1079 | m_PrefabInstance: {fileID: 0} 1080 | m_PrefabAsset: {fileID: 0} 1081 | m_GameObject: {fileID: 2126952212} 1082 | m_Enabled: 1 1083 | m_EditorHideFlags: 0 1084 | m_Script: {fileID: 11500000, guid: d680ee47d9dc35b4f923845545cc2b89, type: 3} 1085 | m_Name: 1086 | m_EditorClassIdentifier: 1087 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6eff4253a1110dd4a8d95596400f3802 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5f5a49249c528446a521f53e1f3c46f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/CapsuleScript.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CapsuleScript : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/CapsuleScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 229624d14d7b7ae41bd689e02acf947b 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/Example/CubeScript.cs: -------------------------------------------------------------------------------- 1 | using NullReferenceDetection; 2 | using UnityEngine; 3 | 4 | public class CubeScript : MonoBehaviour { 5 | 6 | [SerializeField] 7 | private SphereScript sphere; 8 | 9 | [ValueRequired] 10 | public CapsuleScript capsule; 11 | 12 | [ValueOptional] 13 | public CylinderScript cylinder; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/CubeScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed4876b6fb3a21b499eccbbd6a558ad6 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/Example/CylinderScript.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CylinderScript : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/CylinderScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d680ee47d9dc35b4f923845545cc2b89 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/Example/SphereScript.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SphereScript : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Scripts/Example/SphereScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f015692444b5c34f9f927ad0272a928 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/NullReferenceDetection.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71ed4eab89d582b45bacb57facbc4911 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Attributes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98515db227bdd0f4fb5b0083fb2c55b3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Attributes/BaseAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NullReferenceDetection 4 | { 5 | [AttributeUsage(AttributeTargets.Field)] 6 | public abstract class BaseAttribute : Attribute 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Attributes/BaseAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ddd574ef71c5564ba6e374450472e02 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/NullReferenceDetection/Attributes/ValueOptional.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NullReferenceDetection 4 | { 5 | public class ValueOptional : BaseAttribute 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Attributes/ValueOptional.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e251f3ef0041bfa419fd82a55feebccf 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/NullReferenceDetection/Attributes/ValueRequired.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NullReferenceDetection 4 | { 5 | public class ValueRequired : BaseAttribute 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Attributes/ValueRequired.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c831ce22fd1aa242a68847e301736cd 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/NullReferenceDetection/BlacklistItem.cs: -------------------------------------------------------------------------------- 1 | namespace NullReferenceDetection 2 | { 3 | public class BlacklistItem 4 | { 5 | public BlacklistItem(string name, bool ignoreChildren) 6 | { 7 | Name = name; 8 | IgnoreChildren = ignoreChildren; 9 | } 10 | 11 | public string Name { get; } 12 | 13 | public bool IgnoreChildren { get; } 14 | 15 | public bool NameEmpty => string.IsNullOrEmpty(Name); 16 | } 17 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/BlacklistItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bece62ab825a133438ff1f9ddf60134d 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/NullReferenceDetection/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eadedb3e613eab34788580ce3b82f952 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/CompileTimeCheck.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEditor.Callbacks; 3 | 4 | namespace NullReferenceDetection.Editor 5 | { 6 | public static class CompileTimeCheck 7 | { 8 | [DidReloadScripts] 9 | private static void OnScriptsReloaded() 10 | { 11 | if (!PersistableBoolean.CheckOnCompile) 12 | { 13 | return; 14 | } 15 | 16 | EditorApplication.delayCall += CheckForNullReferences; 17 | } 18 | 19 | private static void CheckForNullReferences() 20 | { 21 | EditorApplication.delayCall -= CheckForNullReferences; 22 | ExecuteFindNullReferences.CheckForNullReferences(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/CompileTimeCheck.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bebb09923874f968b1a1bce772e7938 3 | timeCreated: 1701721528 -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/ExecuteFindNullReferences.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace NullReferenceDetection.Editor 7 | { 8 | public static class ExecuteFindNullReferences 9 | { 10 | [MenuItem("Tools/Find Null References")] 11 | public static void Execute() 12 | { 13 | CheckForNullReferences(); 14 | } 15 | 16 | public static bool CheckForNullReferences(Func filter) 17 | { 18 | var detector = new NullReferenceDetector(); 19 | var nullReferences = detector.FindAllNullReferences( 20 | PreferencesSerialization.LoadPrefabList(), 21 | filter, 22 | PreferencesSerialization.LoadIgnoreList()) 23 | .ToList(); 24 | 25 | foreach (var nullReference in nullReferences) 26 | { 27 | var fieldName = ObjectNames.NicifyVariableName(nullReference.FieldName); 28 | var color = ColorFor(nullReference); 29 | 30 | var message = string.Format("Null reference found in {0} > {1} > {3}\n", 31 | nullReference.GameObjectName, 32 | nullReference.ComponentName, 33 | color, 34 | fieldName); 35 | 36 | Debug.Log(message, nullReference.GameObject); 37 | } 38 | 39 | return nullReferences.Any(); 40 | } 41 | 42 | public static bool CheckForNullReferences() 43 | { 44 | return CheckForNullReferences(IsVisible); 45 | } 46 | 47 | private static bool IsVisible(NullReference nullReference) 48 | { 49 | return PreferencesStorage.IsVisible(nullReference.AttributeIdentifier); 50 | } 51 | 52 | private static string ColorFor(NullReference nullReference) 53 | { 54 | var color = PreferencesStorage.ColorFor(nullReference.AttributeIdentifier); 55 | return $"#{ColorUtility.ToHtmlStringRGB(color)}"; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/ExecuteFindNullReferences.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f5b064eb482b304bb60a4f0769c2cb6 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/NullReferenceDetection/Editor/FindNullReferencesPreferences.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace NullReferenceDetection.Editor 7 | { 8 | public class FindNullReferencesPreferences : MonoBehaviour 9 | { 10 | private const float CellMargin = 6; 11 | 12 | private static List _ignoreList; 13 | private static List _prefabsList; 14 | 15 | // Keeps track of whether the local List has had any changes made to it. 16 | private static bool _dirtyIgnoreList; 17 | 18 | // Keeps track of whether the local list has had any changes made to it 19 | private static bool _dirtyPrefabsList; 20 | 21 | [SettingsProvider] 22 | public static SettingsProvider PreferencesGUI() 23 | { 24 | return new SettingsProvider("Project/Null Reference Detection", SettingsScope.Project) 25 | { 26 | label = "Null Reference Detection", 27 | guiHandler = (searchContext) => 28 | { 29 | HandleAttributePreferences(); 30 | 31 | GUILayout.Space(15); 32 | 33 | HandleEventsToReactTo(); 34 | 35 | GUILayout.Space(15); 36 | 37 | HandleIgnoreListPreferences(); 38 | 39 | GUILayout.Space(15); 40 | 41 | HandlePrefabPreferences(); 42 | }, 43 | keywords = new HashSet(new[] {"null", "find", "detect", "reference", "pointer"}) 44 | }; 45 | } 46 | 47 | #region attribute preferences 48 | 49 | private static void HandleAttributePreferences() 50 | { 51 | EditorGUILayout.LabelField("Attribute tag preferences"); 52 | GUILayout.Space(5); 53 | 54 | var attributes = PreferencesStorage.PersistableAttributes; 55 | 56 | foreach (var attribute in attributes) 57 | { 58 | HandleIndividualAttribute(attribute); 59 | } 60 | } 61 | 62 | private static void HandleIndividualAttribute(PersistableAttribute attribute) 63 | { 64 | var rect = EditorGUILayout.BeginHorizontal(); 65 | rect = new Rect(rect.x, rect.y - CellMargin, rect.width, rect.height + CellMargin * 2f); 66 | EditorGUI.DrawRect(rect, new Color(0.5f, 0.5f, 0.5f, 0.3f)); 67 | attribute.IsEnabled = EditorGUILayout.Toggle(attribute.IsEnabled, GUILayout.Width(15)); 68 | EditorGUILayout.LabelField(attribute.Identifier, GUILayout.Width(150)); 69 | attribute.Color = EditorGUILayout.ColorField(attribute.Color, GUILayout.Width(500)); 70 | EditorGUILayout.EndHorizontal(); 71 | GUILayout.Space(14); 72 | } 73 | 74 | #endregion 75 | 76 | private static void HandleEventsToReactTo() 77 | { 78 | EditorGUILayout.LabelField("Automatic checks:"); 79 | GUILayout.Space(5); 80 | 81 | HandleToggle(PersistableBoolean.CheckOnPlay, "Check on entering play mode"); 82 | 83 | if (PersistableBoolean.CheckOnPlay) 84 | { 85 | HandleToggle(PersistableBoolean.CheckOnPlayIntercept, " Prevent from entering play mode"); 86 | } 87 | 88 | HandleToggle(PersistableBoolean.CheckOnCompile, "Check on compile"); 89 | } 90 | 91 | private static void HandleToggle(PersistableBoolean boolean, string text) 92 | { 93 | var rect = EditorGUILayout.BeginHorizontal(); 94 | rect = new Rect(rect.x, rect.y - CellMargin, rect.width, rect.height + CellMargin * 2f); 95 | EditorGUI.DrawRect(rect, new Color(0.5f, 0.5f, 0.5f, 0.3f)); 96 | boolean.Value = EditorGUILayout.Toggle(boolean.Value, GUILayout.Width(15)); 97 | EditorGUILayout.LabelField(text, GUILayout.Width(200)); 98 | EditorGUILayout.EndHorizontal(); 99 | GUILayout.Space(14); 100 | } 101 | 102 | #region ignore-items preferences 103 | 104 | /// 105 | /// Do the UI elements for the ignore list 106 | /// 107 | private static void HandleIgnoreListPreferences() 108 | { 109 | if (_ignoreList == null) 110 | { 111 | _ignoreList = PreferencesSerialization 112 | .LoadIgnoreList() 113 | .ToList(); 114 | } 115 | 116 | EditorGUILayout.LabelField( 117 | "Ignore list - enter the name of a GameObject to ignore when scanning (case sensitive)"); 118 | GUILayout.Space(5); 119 | 120 | var rect = EditorGUILayout.BeginHorizontal(); 121 | rect = new Rect(rect.x, rect.y - CellMargin, rect.width, 10 + CellMargin); 122 | EditorGUI.DrawRect(new Rect(rect.x, rect.y, rect.width, 55 + CellMargin * 2f), 123 | new Color(0.5f, 0.5f, 0.5f, 124 | 0.3f)); //the drawn rectangle is bigger than the actual rectangle to include the buttons 125 | 126 | EditorGUI.LabelField(rect, 127 | "Use +/- buttons to increase or decrease number of items in ignore list: (" + 128 | _ignoreList.Count + ")"); 129 | 130 | EditorGUILayout.EndHorizontal(); 131 | GUILayout.Space(10); 132 | 133 | if (GUILayout.Button("+", GUILayout.Width(40))) 134 | { 135 | var blacklistItem = new BlacklistItem(string.Empty, ignoreChildren: false); 136 | _ignoreList.Add(blacklistItem); 137 | } 138 | 139 | if (GUILayout.Button("-", GUILayout.Width(40)) && _ignoreList.Count > 0) 140 | { 141 | _ignoreList.RemoveAt(_ignoreList.Count - 1); 142 | _dirtyIgnoreList = true; 143 | } 144 | 145 | GUILayout.Space(18); 146 | 147 | if (_ignoreList.Count != 0) 148 | { 149 | // Handle UI and save changes to local ignoreList 150 | for (int i = 0; i < _ignoreList.Count; i++) 151 | { 152 | _ignoreList[i] = HandleIndividualIgnoreItem(_ignoreList[i]); 153 | } 154 | } 155 | 156 | // Save the inputs, if anything changed 157 | if (_dirtyIgnoreList) 158 | { 159 | PreferencesSerialization.SaveIgnoreList(_ignoreList); 160 | _dirtyIgnoreList = false; 161 | } 162 | } 163 | 164 | /// 165 | /// Draws the UI element for each ignore item, and saves the values into the list for use 166 | /// 167 | private static BlacklistItem HandleIndividualIgnoreItem(BlacklistItem blacklistItem) 168 | { 169 | var rect = EditorGUILayout.BeginHorizontal(); 170 | rect = new Rect(rect.x, rect.y - CellMargin, rect.width, rect.height + CellMargin * 2f); 171 | EditorGUI.DrawRect(rect, new Color(0.5f, 0.5f, 0.5f, 0.3f)); 172 | 173 | EditorGUILayout.LabelField("GameObject name: ", GUILayout.Width(112)); 174 | var name = EditorGUILayout.TextField(blacklistItem.Name, GUILayout.Width(250)); 175 | EditorGUILayout.LabelField(" Also ignore children: ", GUILayout.Width(137)); 176 | var ignoreChildren = EditorGUILayout.Toggle(blacklistItem.IgnoreChildren, GUILayout.Width(15)); 177 | EditorGUILayout.EndHorizontal(); 178 | GUILayout.Space(14); 179 | 180 | if (name != blacklistItem.Name || ignoreChildren != blacklistItem.IgnoreChildren) 181 | { 182 | _dirtyIgnoreList = true; 183 | } 184 | 185 | return new BlacklistItem(name.Trim(), ignoreChildren); 186 | } 187 | 188 | #endregion 189 | 190 | #region prefab-item preferences 191 | 192 | private static void HandlePrefabPreferences() 193 | { 194 | _prefabsList ??= PreferencesSerialization.LoadPrefabList().ToList(); 195 | 196 | EditorGUILayout.LabelField( 197 | "Additional Prefabs to scan (only objects in the scene will be scanned, plus any prefabs which you define here)"); 198 | GUILayout.Space(5); 199 | 200 | var rect = EditorGUILayout.BeginHorizontal(); 201 | rect = new Rect(rect.x, rect.y - CellMargin, rect.width, 10 + CellMargin); 202 | 203 | // The drawn rectangle is bigger than the actual rectangle to include the buttons 204 | EditorGUI.DrawRect(new Rect(rect.x, rect.y, rect.width, 55 + CellMargin * 2f), 205 | new Color(0.5f, 0.5f, 0.5f, 0.3f)); 206 | 207 | EditorGUI.LabelField(rect, 208 | "Use +/- buttons to increase or decrease number of items in external file list: (" + 209 | _prefabsList.Count + ")"); 210 | 211 | EditorGUILayout.EndHorizontal(); 212 | GUILayout.Space(10); 213 | 214 | if (GUILayout.Button("+", GUILayout.Width(40))) 215 | { 216 | _prefabsList.Add(null); 217 | } 218 | 219 | if (GUILayout.Button("-", GUILayout.Width(40)) && _prefabsList.Count > 0) 220 | { 221 | _prefabsList.RemoveAt(_prefabsList.Count - 1); 222 | _dirtyPrefabsList = true; 223 | } 224 | 225 | GUILayout.Space(18); 226 | 227 | // Handle UI and save changes to local ignoreList 228 | if (_prefabsList.Count > 0) 229 | { 230 | for (int i = 0; i < _prefabsList.Count; i++) 231 | { 232 | _prefabsList[i] = HandleIndividualPrefabItems(_prefabsList[i]); 233 | } 234 | } 235 | 236 | // Save the inputs if anything changed 237 | if (_dirtyPrefabsList) 238 | { 239 | PreferencesSerialization.SavePrefabList(_prefabsList); 240 | _dirtyPrefabsList = false; 241 | } 242 | } 243 | 244 | private static GameObject HandleIndividualPrefabItems(GameObject previousValue) 245 | { 246 | var rect = EditorGUILayout.BeginHorizontal(); 247 | rect = new Rect(rect.x, rect.y - CellMargin, rect.width, rect.height + CellMargin * 2f); 248 | EditorGUI.DrawRect(rect, new Color(0.5f, 0.5f, 0.5f, 0.3f)); 249 | 250 | GameObject newValue = null; 251 | newValue = (GameObject) EditorGUI.ObjectField(new Rect(rect.x, rect.y + 7, 400, 15), "Select a prefab:", 252 | previousValue, typeof(GameObject), false); 253 | 254 | EditorGUILayout.LabelField("", GUILayout.Width(500)); 255 | 256 | if (newValue != null) 257 | { 258 | EditorGUILayout.LabelField(PrefabUtility.GetPrefabAssetPathOfNearestInstanceRoot(newValue)); 259 | } 260 | 261 | EditorGUILayout.EndHorizontal(); 262 | GUILayout.Space(14); 263 | 264 | if (newValue != previousValue) 265 | { 266 | _dirtyPrefabsList = true; 267 | return newValue; 268 | } 269 | 270 | return previousValue; 271 | } 272 | 273 | #endregion 274 | } 275 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/FindNullReferencesPreferences.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b4a408ec3e203b4f89589baf24a5942 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/NullReferenceDetection/Editor/PersistableAttribute.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace NullReferenceDetection.Editor 5 | { 6 | public class PersistableAttribute 7 | { 8 | private const string EnabledPostfix = "enabled"; 9 | private const string ColorPostfix = "color"; 10 | 11 | private readonly bool _defaultEnabledState; 12 | private readonly Color _defaultColor = Color.black; 13 | 14 | private readonly string _identifier; 15 | 16 | private bool? _enabled; 17 | private Color? _color; 18 | 19 | public PersistableAttribute(string identifier) 20 | { 21 | _identifier = identifier; 22 | } 23 | 24 | public PersistableAttribute(string identifier, bool enabled, Color color) : this(identifier) 25 | { 26 | _defaultEnabledState = enabled; 27 | _defaultColor = color; 28 | 29 | if (!IsEntryExistingFor(EnabledPostfix)) 30 | { 31 | IsEnabled = enabled; 32 | } 33 | 34 | if (!IsEntryExistingFor(ColorPostfix)) 35 | { 36 | Color = color; 37 | } 38 | } 39 | 40 | public string Identifier => _identifier; 41 | 42 | public bool IsEnabled 43 | { 44 | get 45 | { 46 | if (_enabled == null) 47 | { 48 | if (IsEntryExistingFor(EnabledPostfix)) 49 | { 50 | _enabled = EditorPrefs.GetBool(KeyForPostfix(EnabledPostfix)); 51 | } 52 | else 53 | { 54 | IsEnabled = true; 55 | } 56 | } 57 | return _enabled ?? _defaultEnabledState; 58 | } 59 | set 60 | { 61 | _enabled = value; 62 | EditorPrefs.SetBool(KeyForPostfix(EnabledPostfix), value); 63 | } 64 | } 65 | 66 | public Color Color 67 | { 68 | get 69 | { 70 | if (_color == null) 71 | { 72 | if (IsEntryExistingFor(ColorPostfix)) 73 | { 74 | var colorString = EditorPrefs.GetString(KeyForPostfix(ColorPostfix)); 75 | 76 | Color localColor; 77 | ColorUtility.TryParseHtmlString(colorString, out localColor); 78 | _color = localColor; 79 | } 80 | else 81 | { 82 | Color = _defaultColor; 83 | } 84 | } 85 | return _color ?? _defaultColor; 86 | } 87 | set 88 | { 89 | _color = value; 90 | var colorInstance = _color ?? _defaultColor; 91 | var hexColor = $"#{ColorUtility.ToHtmlStringRGB(colorInstance)}"; 92 | EditorPrefs.SetString(KeyForPostfix(ColorPostfix), hexColor); 93 | } 94 | } 95 | 96 | private string KeyForPostfix(string postfix) 97 | { 98 | return $"null_helper_{_identifier}_{postfix}"; 99 | } 100 | 101 | private bool IsEntryExistingFor(string postfix) 102 | { 103 | return EditorPrefs.HasKey(KeyForPostfix(postfix)); 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/PersistableAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4eedde3f58f14846aa345e38971e6ff 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/NullReferenceDetection/Editor/PersistableBoolean.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | namespace NullReferenceDetection.Editor 4 | { 5 | public class PersistableBoolean 6 | { 7 | private readonly string _identifier; 8 | private readonly bool _defaultValue; 9 | 10 | public PersistableBoolean(string identifier, bool defaultValue) 11 | { 12 | _identifier = identifier; 13 | _defaultValue = defaultValue; 14 | } 15 | 16 | public static implicit operator bool(PersistableBoolean persistableBoolean) => persistableBoolean.Value; 17 | 18 | public string Identifier => _identifier; 19 | 20 | public bool Value 21 | { 22 | get 23 | { 24 | if (!EditorPrefs.HasKey(_identifier)) 25 | { 26 | EditorPrefs.SetBool(_identifier, _defaultValue); 27 | } 28 | 29 | return EditorPrefs.GetBool(_identifier); 30 | } 31 | set => EditorPrefs.SetBool(_identifier, value); 32 | } 33 | 34 | public bool DefaultValue => _defaultValue; 35 | 36 | public static PersistableBoolean CheckOnPlay = new PersistableBoolean("null_helper_check_play", false); 37 | public static PersistableBoolean CheckOnPlayIntercept = new PersistableBoolean("null_helper_check_play_intercept", false); 38 | public static PersistableBoolean CheckOnCompile = new PersistableBoolean("null_helper_check_compile", false); 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/PersistableBoolean.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2fb6032f2e74d0f8f4a3a1379114d3b 3 | timeCreated: 1701724992 -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/PlayModeCheck.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace NullReferenceDetection.Editor 5 | { 6 | [InitializeOnLoad] 7 | public static class PlayModeCheck 8 | { 9 | static PlayModeCheck() 10 | { 11 | EditorApplication.playModeStateChanged += CheckForNullReferences; 12 | } 13 | 14 | private static void CheckForNullReferences(PlayModeStateChange state) 15 | { 16 | if (!PersistableBoolean.CheckOnPlay) 17 | { 18 | return; 19 | } 20 | 21 | if (!PersistableBoolean.CheckOnPlayIntercept && state == PlayModeStateChange.EnteredPlayMode) 22 | { 23 | ExecuteFindNullReferences.CheckForNullReferences(); 24 | return; 25 | } 26 | 27 | if (PersistableBoolean.CheckOnPlayIntercept && state == PlayModeStateChange.ExitingEditMode) 28 | { 29 | var hasNullReferences = ExecuteFindNullReferences.CheckForNullReferences(); 30 | 31 | if (hasNullReferences) 32 | { 33 | EditorApplication.isPlaying = false; 34 | Debug.LogError( 35 | "Entering play mode has been stopped because null references have been found on one or more objects.\n Fix these errors or disable the null reference check in the settings."); 36 | } 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/PlayModeCheck.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1ab0bbc36d98e445a78acb7f62be285 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/NullReferenceDetection/Editor/PreferencesSerialization.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace NullReferenceDetection.Editor 8 | { 9 | public static class PreferencesSerialization 10 | { 11 | #region save/load functions 12 | 13 | // TODO: Where would we like to save the files? 14 | private static readonly string FolderPath = string.Empty; 15 | private static readonly string IgnoreListFile = FolderPath + "NullReferenceDetector.IgnoreList"; 16 | private static readonly string PrefabListFile = FolderPath + "NullReferenceDetector.PrefabList"; 17 | 18 | /// 19 | /// Applies the values entered in the GUI and saves them for future sessions. 20 | /// 21 | public static void SaveIgnoreList(IEnumerable ignoreList) 22 | { 23 | // Remove empty entries 24 | ignoreList = ignoreList.Where(item => !item.NameEmpty).ToList(); 25 | 26 | try 27 | { 28 | var writer = new StreamWriter(IgnoreListFile, false); 29 | 30 | foreach (var itemToIgnore in ignoreList) 31 | { 32 | var children = itemToIgnore.IgnoreChildren ? "1" : "0"; 33 | writer.WriteLine($"{itemToIgnore.Name} {children}"); 34 | } 35 | 36 | writer.Dispose(); 37 | } 38 | catch (IOException e) 39 | { 40 | Debug.LogError(e.Message); 41 | } 42 | } 43 | 44 | /// 45 | /// Reads values from file and returns list. 46 | /// 47 | public static IEnumerable LoadIgnoreList() 48 | { 49 | var ignoreList = new List(); 50 | 51 | if (!File.Exists(IgnoreListFile)) 52 | { 53 | File.Create(IgnoreListFile); 54 | Debug.LogWarning("Null reference checker found no previously saved preferences file, so it created a new one"); 55 | return ignoreList; 56 | } 57 | 58 | try 59 | { 60 | var reader = new StreamReader(IgnoreListFile); 61 | 62 | while (reader.Peek() != -1) 63 | { 64 | var line = reader.ReadLine(); 65 | 66 | if (line == null) 67 | { 68 | continue; 69 | } 70 | 71 | if (line.Trim().Length == 0) 72 | { 73 | continue; 74 | } 75 | 76 | var name = line.Substring(0, line.Length - 2); 77 | 78 | if (line[^1] == '1') 79 | { 80 | ignoreList.Add(new BlacklistItem(name, ignoreChildren: true)); 81 | } 82 | if (line[^1] == '0') 83 | { 84 | ignoreList.Add(new BlacklistItem(name, ignoreChildren: false)); 85 | } 86 | else 87 | { 88 | throw new IOException("Null Reference Checker encountered a problem when loading saved file."); 89 | } 90 | } 91 | 92 | reader.Dispose(); 93 | } 94 | catch (IOException e) 95 | { 96 | Debug.LogError(e.Message); 97 | } 98 | 99 | return ignoreList; 100 | } 101 | 102 | /// 103 | /// Applies the values entered in the GUI and saves them for future sessions 104 | /// 105 | public static void SavePrefabList(IEnumerable prefabList) 106 | { 107 | try 108 | { 109 | var writer = new StreamWriter(PrefabListFile, false); 110 | 111 | foreach (var itemToSave in prefabList) 112 | { 113 | if (itemToSave == null) 114 | { 115 | continue; 116 | } 117 | 118 | writer.WriteLine(PrefabUtility.GetPrefabAssetPathOfNearestInstanceRoot(itemToSave)); 119 | } 120 | 121 | writer.Dispose(); 122 | } 123 | catch (IOException e) 124 | { 125 | Debug.LogError(e.Message); 126 | } 127 | } 128 | 129 | /// 130 | /// Reads values from file and returns list. 131 | /// When saved to file the paths of the prefabs are saved, not the prefabs themselves. 132 | /// 133 | public static IEnumerable LoadPrefabList() 134 | { 135 | var results = new List(); 136 | 137 | if (!File.Exists(PrefabListFile)) 138 | { 139 | File.Create(PrefabListFile); 140 | Debug.LogWarning("Null reference checker found no previously saved preferences file, so it created a new one"); 141 | return new List(); 142 | } 143 | 144 | try 145 | { 146 | var reader = new StreamReader(PrefabListFile); 147 | 148 | while (reader.Peek() != -1) 149 | { 150 | var line = reader.ReadLine(); 151 | 152 | if (line == null) 153 | { 154 | continue; 155 | } 156 | 157 | if (line.Trim().Length == 0) 158 | { 159 | continue; 160 | } 161 | 162 | var loadedAsset = AssetDatabase.LoadAssetAtPath(line); 163 | 164 | if (loadedAsset != null) 165 | { 166 | results.Add(loadedAsset); 167 | } 168 | else 169 | { 170 | Debug.LogWarning("Null reference checker found no prefab at path " + 171 | line + 172 | " perhaps the path or filename changed. this path will be deleted from the list of prefabs and needs to be re-added manually"); 173 | } 174 | } 175 | 176 | reader.Dispose(); 177 | } 178 | catch (IOException e) 179 | { 180 | Debug.LogError(e.Message); 181 | } 182 | return results; 183 | } 184 | 185 | #endregion 186 | } 187 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/PreferencesSerialization.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62de5372ab43a8241ba6114775d906d5 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/NullReferenceDetection/Editor/PreferencesStorage.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEngine; 4 | 5 | namespace NullReferenceDetection.Editor 6 | { 7 | public static class PreferencesStorage 8 | { 9 | private static readonly Dictionary Mapping = new(); 10 | 11 | static PreferencesStorage() 12 | { 13 | InitializeMapping(); 14 | } 15 | 16 | private static void InitializeMapping() 17 | { 18 | var attributes = typeof(BaseAttribute).GetDescendantTypes(); 19 | 20 | // Initialize settings for unattributed fields 21 | var unattributedWrapper = new PersistableAttribute(NullReference.UnattributedIdentifier, true, new Color(.717f, .647f, .125f)); 22 | Mapping.Add(NullReference.UnattributedIdentifier, unattributedWrapper); 23 | 24 | // Initialize Attributes 25 | foreach (var attribute in attributes) 26 | { 27 | PersistableAttribute persistenceWrapper; 28 | 29 | if (attribute == typeof(ValueOptional)) 30 | { 31 | persistenceWrapper = new PersistableAttribute(attribute.Name, false, Color.black); 32 | } 33 | else if (attribute == typeof(ValueRequired)) 34 | { 35 | persistenceWrapper = new PersistableAttribute(attribute.Name, true, new Color(.718f, .129f, .176f)); 36 | } 37 | else 38 | { 39 | persistenceWrapper = new PersistableAttribute(attribute.Name); 40 | } 41 | 42 | Mapping.Add(attribute.Name, persistenceWrapper); 43 | } 44 | } 45 | 46 | public static bool IsVisible(string attributeName) 47 | { 48 | return Mapping[attributeName].IsEnabled; 49 | } 50 | 51 | public static Color ColorFor(string attributeName) 52 | { 53 | return Mapping[attributeName].Color; 54 | } 55 | 56 | public static IEnumerable PersistableAttributes => Mapping.Values.ToList(); 57 | } 58 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/Editor/PreferencesStorage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a30fd3592fcdec479b1499910b6c497 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/NullReferenceDetection/ExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using UnityEngine; 6 | 7 | namespace NullReferenceDetection 8 | { 9 | public static class ExtensionMethods 10 | { 11 | public static IEnumerable AllComponents(this GameObject gameObject) 12 | { 13 | return gameObject.GetComponents(); 14 | } 15 | 16 | public static IEnumerable GetInspectableFields(this Component component) 17 | { 18 | var componentType = component.GetType(); 19 | var inspectableFields = new List(); 20 | 21 | var publicFields = componentType.GetFields(BindingFlags.Public | BindingFlags.Instance).ToList(); 22 | var privateFields = componentType.GetFields(BindingFlags.NonPublic | BindingFlags.Instance).ToList(); 23 | 24 | // Private fields can be inspected if they are explicitly serialized 25 | privateFields = privateFields.Where(f => f.HasAttribute()).ToList(); 26 | 27 | // Add remaining private and public fields to the list of all inspectable fields 28 | inspectableFields.AddRange(publicFields); 29 | inspectableFields.AddRange(privateFields); 30 | 31 | // Remove fields that should be hidden in the inspector 32 | inspectableFields = inspectableFields.Where(f => !f.HasAttribute()).ToList(); 33 | 34 | return inspectableFields; 35 | } 36 | 37 | public static bool HasAttribute(this FieldInfo field) 38 | { 39 | return field.GetCustomAttributes(typeof(T), true).Any(); 40 | } 41 | 42 | public static T GetAttribute(this FieldInfo field) 43 | { 44 | return (T)field.GetCustomAttributes(typeof(T), true).FirstOrDefault(); 45 | } 46 | 47 | public static bool IsNull(this FieldInfo field, object obj) 48 | { 49 | var value = field.GetValue(obj); 50 | return value == null || value.ToString() == "null"; 51 | } 52 | 53 | public static IEnumerable GetDescendantTypes(this Type type) 54 | { 55 | var allTypes = Assembly.GetExecutingAssembly().GetTypes(); 56 | return allTypes.Where(t => t != type && type.IsAssignableFrom(t)).ToList(); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/ExtensionMethods.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd63b896c7e7ca2429c0fc679410c53c 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/NullReferenceDetection/NullReference.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using UnityEngine; 4 | 5 | namespace NullReferenceDetection 6 | { 7 | public struct NullReference 8 | { 9 | public static readonly string UnattributedIdentifier = "Unattributed"; 10 | 11 | public Type Attribute { get; set; } 12 | 13 | public FieldInfo FieldInfo { get; set; } 14 | 15 | public Component Source { get; set; } 16 | 17 | public GameObject GameObject => Source.gameObject; 18 | 19 | public string GameObjectName => Source.gameObject.name; 20 | 21 | public string ComponentName => Source.GetType().ToString(); 22 | 23 | public string FieldName => FieldInfo.Name; 24 | 25 | public bool IsAttributed => Attribute != null; 26 | 27 | public string AttributeIdentifier 28 | { 29 | get 30 | { 31 | return Attribute != null ? Attribute.Name : UnattributedIdentifier; 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/NullReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1ce446de4552eb4cbbad69717f86dfc 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/NullReferenceDetection/NullReferenceDetector.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System; 6 | using UnityObject = UnityEngine.Object; 7 | 8 | namespace NullReferenceDetection 9 | { 10 | public class NullReferenceDetector 11 | { 12 | public IEnumerable FindAllNullReferences( 13 | IEnumerable prefabList, 14 | IEnumerable ignoreList = null) 15 | { 16 | var sceneObjects = UnityObject.FindObjectsOfType(); 17 | var prefabObjects = FindObjectsInPrefabs(prefabList); 18 | var allObjects = sceneObjects.Concat(prefabObjects); 19 | 20 | if (ignoreList != null) 21 | { 22 | allObjects = RemoveIgnoredItems(allObjects, ignoreList); 23 | } 24 | 25 | return allObjects.SelectMany(FindNullReferencesIn).ToList(); 26 | } 27 | 28 | public IEnumerable FindAllNullReferences( 29 | IEnumerable prefabList, 30 | Func predicate, 31 | IEnumerable ignoreList = null) 32 | { 33 | return FindAllNullReferences(prefabList, ignoreList).Where(predicate).ToList(); 34 | } 35 | 36 | private IEnumerable FindNullReferencesIn(GameObject gameObject) 37 | { 38 | var components = gameObject.AllComponents(); 39 | return components.Where(n => n != null).SelectMany(FindNullReferencesIn); 40 | } 41 | 42 | private IEnumerable FindNullReferencesIn(Component component) 43 | { 44 | var inspectableFields = component.GetInspectableFields(); 45 | var nullFields = inspectableFields.Where(f => f.IsNull(component)); 46 | 47 | return nullFields.Select(f => 48 | new NullReference 49 | { 50 | Source = component, 51 | FieldInfo = f, 52 | Attribute = AttributeFor(f) 53 | }).ToList(); 54 | } 55 | 56 | private Type AttributeFor(FieldInfo field) 57 | { 58 | if (field.HasAttribute()) 59 | { 60 | return field.GetAttribute().GetType(); 61 | } 62 | 63 | return null; 64 | } 65 | 66 | private IEnumerable RemoveIgnoredItems(IEnumerable inputObjects, IEnumerable ignoreList) 67 | { 68 | var objectsToBeRemoved = new List(); 69 | 70 | // Make a list of gameobjects to be filtered out (not really efficient but it doesnt need to be 👿) 71 | foreach (var blacklistItem in ignoreList) 72 | { 73 | foreach (var targetObject in inputObjects) 74 | { 75 | if (targetObject.name != blacklistItem.Name) 76 | { 77 | continue; 78 | } 79 | objectsToBeRemoved.Add(targetObject); 80 | 81 | if (!blacklistItem.IgnoreChildren) 82 | { 83 | continue; 84 | } 85 | 86 | foreach (Transform child in targetObject.transform) 87 | { 88 | objectsToBeRemoved.Add(child.gameObject); 89 | } 90 | } 91 | } 92 | 93 | // Now remove those items we found 94 | var cleanedList = inputObjects.ToList(); 95 | 96 | foreach (var targetObject in objectsToBeRemoved) 97 | { 98 | cleanedList.Remove(targetObject); 99 | } 100 | 101 | return cleanedList; 102 | } 103 | 104 | private IEnumerable FindObjectsInPrefabs(IEnumerable prefabList) 105 | { 106 | var foundObjects = new List(); 107 | 108 | foreach (var gameObject in prefabList) 109 | { 110 | foundObjects.Add(gameObject); 111 | foundObjects.AddRange(gameObject.GetComponentsInChildren().Select(t => t.gameObject)); 112 | } 113 | 114 | return foundObjects; 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /Assets/Scripts/NullReferenceDetection/NullReferenceDetector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e32465949dda73344870550f732f6bdf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Documentation/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/0c8d499e5f25e9d3b89dabc0bfec150dfce43d30/Documentation/screenshot.png -------------------------------------------------------------------------------- /Documentation/settings_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/0c8d499e5f25e9d3b89dabc0bfec150dfce43d30/Documentation/settings_screen.png -------------------------------------------------------------------------------- /Documentation/settings_screen_ignore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/0c8d499e5f25e9d3b89dabc0bfec150dfce43d30/Documentation/settings_screen_ignore.png -------------------------------------------------------------------------------- /Documentation/settings_screen_prefabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/0c8d499e5f25e9d3b89dabc0bfec150dfce43d30/Documentation/settings_screen_prefabs.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Malte Weiß 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 | -------------------------------------------------------------------------------- /NullReferenceDetector.IgnoreList: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/0c8d499e5f25e9d3b89dabc0bfec150dfce43d30/NullReferenceDetector.IgnoreList -------------------------------------------------------------------------------- /NullReferenceDetector.PrefabList: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/0c8d499e5f25e9d3b89dabc0bfec150dfce43d30/NullReferenceDetector.PrefabList -------------------------------------------------------------------------------- /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: 99c9720ab356a0642a771bea13969a05 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: 0 11 | m_SpritePackerMode: 0 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: 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/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: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /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: 4831a3f6c7270ff42bcb62361e6dea8e 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: Unity-Null-Reference-Detection 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 | 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 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidBlitType: 0 67 | defaultIsNativeResolution: 1 68 | macRetinaSupport: 1 69 | runInBackground: 1 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | deferSystemGesturesMode: 0 75 | hideHomeButton: 0 76 | submitAnalytics: 1 77 | usePlayerLog: 1 78 | bakeCollisionMeshes: 0 79 | forceSingleInstance: 0 80 | resizableWindow: 0 81 | useMacAppStoreValidation: 0 82 | macAppStoreCategory: public.app-category.games 83 | gpuSkinning: 1 84 | graphicsJobs: 1 85 | xboxPIXTextureCapture: 0 86 | xboxEnableAvatar: 0 87 | xboxEnableKinect: 0 88 | xboxEnableKinectAutoTracking: 0 89 | xboxEnableFitness: 0 90 | visibleInBackground: 1 91 | allowFullscreenSwitch: 1 92 | graphicsJobMode: 0 93 | fullscreenMode: 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 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOnePresentImmediateThreshold: 0 109 | switchQueueCommandMemory: 0 110 | videoMemoryForVertexBuffers: 0 111 | psp2PowerMode: 0 112 | psp2AcquireBGM: 1 113 | vulkanEnableSetSRGBWrite: 0 114 | vulkanUseSWCommandBuffers: 1 115 | m_SupportedAspectRatios: 116 | 4:3: 1 117 | 5:4: 1 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 1 121 | bundleVersion: 0.1 122 | preloadedAssets: [] 123 | metroInputSource: 0 124 | wsaTransparentSwapchain: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 0 127 | xboxOneEnable7thCore: 0 128 | vrSettings: 129 | cardboard: 130 | depthFormat: 0 131 | enableTransitionView: 0 132 | daydream: 133 | depthFormat: 0 134 | useSustainedPerformanceMode: 0 135 | enableVideoLayer: 0 136 | useProtectedVideoMemory: 0 137 | minimumSupportedHeadTracking: 0 138 | maximumSupportedHeadTracking: 1 139 | hololens: 140 | depthFormat: 1 141 | depthBufferSharingEnabled: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | enable360StereoCapture: 0 146 | protectGraphicsMemory: 0 147 | useHDRDisplay: 0 148 | m_ColorGamuts: 00000000 149 | targetPixelDensity: 30 150 | resolutionScalingMode: 0 151 | androidSupportedAspectRatio: 1 152 | androidMaxAspectRatio: 2.1 153 | applicationIdentifier: {} 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 | vulkanEditorSupport: 0 238 | clonedFromGUID: 56e7a2d3a00f33d44bdd161b773c35b5 239 | templatePackageId: com.unity.3d@1.0.0 240 | templateDefaultScene: Assets/Scenes/SampleScene.unity 241 | AndroidTargetArchitectures: 5 242 | AndroidSplashScreenScale: 0 243 | androidSplashScreen: {fileID: 0} 244 | AndroidKeystoreName: 245 | AndroidKeyaliasName: 246 | AndroidBuildApkPerCpuArchitecture: 0 247 | AndroidTVCompatibility: 1 248 | AndroidIsGame: 1 249 | AndroidEnableTango: 0 250 | androidEnableBanner: 1 251 | androidUseLowAccuracyLocation: 0 252 | m_AndroidBanners: 253 | - width: 320 254 | height: 180 255 | banner: {fileID: 0} 256 | androidGamepadSupportLevel: 0 257 | resolutionDialogBanner: {fileID: 0} 258 | m_BuildTargetIcons: [] 259 | m_BuildTargetPlatformIcons: [] 260 | m_BuildTargetBatching: 261 | - m_BuildTarget: Standalone 262 | m_StaticBatching: 1 263 | m_DynamicBatching: 0 264 | m_BuildTargetGraphicsAPIs: [] 265 | m_BuildTargetVRSettings: 266 | - m_BuildTarget: Standalone 267 | m_Enabled: 0 268 | m_Devices: 269 | - Oculus 270 | - OpenVR 271 | m_BuildTargetEnableVuforiaSettings: [] 272 | openGLRequireES31: 0 273 | openGLRequireES31AEP: 0 274 | m_TemplateCustomTags: {} 275 | mobileMTRendering: 276 | Android: 1 277 | iPhone: 1 278 | tvOS: 1 279 | m_BuildTargetGroupLightmapEncodingQuality: [] 280 | m_BuildTargetGroupLightmapSettings: [] 281 | playModeTestRunnerEnabled: 0 282 | runPlayModeTestAsEditModeTest: 0 283 | actionOnDotNetUnhandledException: 1 284 | enableInternalProfiler: 0 285 | logObjCUncaughtExceptions: 1 286 | enableCrashReportAPI: 0 287 | cameraUsageDescription: 288 | locationUsageDescription: 289 | microphoneUsageDescription: 290 | switchNetLibKey: 291 | switchSocketMemoryPoolSize: 6144 292 | switchSocketAllocatorPoolSize: 128 293 | switchSocketConcurrencyLimit: 14 294 | switchScreenResolutionBehavior: 2 295 | switchUseCPUProfiler: 0 296 | switchApplicationID: 0x01004b9000490000 297 | switchNSODependencies: 298 | switchTitleNames_0: 299 | switchTitleNames_1: 300 | switchTitleNames_2: 301 | switchTitleNames_3: 302 | switchTitleNames_4: 303 | switchTitleNames_5: 304 | switchTitleNames_6: 305 | switchTitleNames_7: 306 | switchTitleNames_8: 307 | switchTitleNames_9: 308 | switchTitleNames_10: 309 | switchTitleNames_11: 310 | switchTitleNames_12: 311 | switchTitleNames_13: 312 | switchTitleNames_14: 313 | switchPublisherNames_0: 314 | switchPublisherNames_1: 315 | switchPublisherNames_2: 316 | switchPublisherNames_3: 317 | switchPublisherNames_4: 318 | switchPublisherNames_5: 319 | switchPublisherNames_6: 320 | switchPublisherNames_7: 321 | switchPublisherNames_8: 322 | switchPublisherNames_9: 323 | switchPublisherNames_10: 324 | switchPublisherNames_11: 325 | switchPublisherNames_12: 326 | switchPublisherNames_13: 327 | switchPublisherNames_14: 328 | switchIcons_0: {fileID: 0} 329 | switchIcons_1: {fileID: 0} 330 | switchIcons_2: {fileID: 0} 331 | switchIcons_3: {fileID: 0} 332 | switchIcons_4: {fileID: 0} 333 | switchIcons_5: {fileID: 0} 334 | switchIcons_6: {fileID: 0} 335 | switchIcons_7: {fileID: 0} 336 | switchIcons_8: {fileID: 0} 337 | switchIcons_9: {fileID: 0} 338 | switchIcons_10: {fileID: 0} 339 | switchIcons_11: {fileID: 0} 340 | switchIcons_12: {fileID: 0} 341 | switchIcons_13: {fileID: 0} 342 | switchIcons_14: {fileID: 0} 343 | switchSmallIcons_0: {fileID: 0} 344 | switchSmallIcons_1: {fileID: 0} 345 | switchSmallIcons_2: {fileID: 0} 346 | switchSmallIcons_3: {fileID: 0} 347 | switchSmallIcons_4: {fileID: 0} 348 | switchSmallIcons_5: {fileID: 0} 349 | switchSmallIcons_6: {fileID: 0} 350 | switchSmallIcons_7: {fileID: 0} 351 | switchSmallIcons_8: {fileID: 0} 352 | switchSmallIcons_9: {fileID: 0} 353 | switchSmallIcons_10: {fileID: 0} 354 | switchSmallIcons_11: {fileID: 0} 355 | switchSmallIcons_12: {fileID: 0} 356 | switchSmallIcons_13: {fileID: 0} 357 | switchSmallIcons_14: {fileID: 0} 358 | switchManualHTML: 359 | switchAccessibleURLs: 360 | switchLegalInformation: 361 | switchMainThreadStackSize: 1048576 362 | switchPresenceGroupId: 363 | switchLogoHandling: 0 364 | switchReleaseVersion: 0 365 | switchDisplayVersion: 1.0.0 366 | switchStartupUserAccount: 0 367 | switchTouchScreenUsage: 0 368 | switchSupportedLanguagesMask: 0 369 | switchLogoType: 0 370 | switchApplicationErrorCodeCategory: 371 | switchUserAccountSaveDataSize: 0 372 | switchUserAccountSaveDataJournalSize: 0 373 | switchApplicationAttribute: 0 374 | switchCardSpecSize: -1 375 | switchCardSpecClock: -1 376 | switchRatingsMask: 0 377 | switchRatingsInt_0: 0 378 | switchRatingsInt_1: 0 379 | switchRatingsInt_2: 0 380 | switchRatingsInt_3: 0 381 | switchRatingsInt_4: 0 382 | switchRatingsInt_5: 0 383 | switchRatingsInt_6: 0 384 | switchRatingsInt_7: 0 385 | switchRatingsInt_8: 0 386 | switchRatingsInt_9: 0 387 | switchRatingsInt_10: 0 388 | switchRatingsInt_11: 0 389 | switchLocalCommunicationIds_0: 390 | switchLocalCommunicationIds_1: 391 | switchLocalCommunicationIds_2: 392 | switchLocalCommunicationIds_3: 393 | switchLocalCommunicationIds_4: 394 | switchLocalCommunicationIds_5: 395 | switchLocalCommunicationIds_6: 396 | switchLocalCommunicationIds_7: 397 | switchParentalControl: 0 398 | switchAllowsScreenshot: 1 399 | switchAllowsVideoCapturing: 1 400 | switchAllowsRuntimeAddOnContentInstall: 0 401 | switchDataLossConfirmation: 0 402 | switchSupportedNpadStyles: 3 403 | switchSocketConfigEnabled: 0 404 | switchTcpInitialSendBufferSize: 32 405 | switchTcpInitialReceiveBufferSize: 64 406 | switchTcpAutoSendBufferSizeMax: 256 407 | switchTcpAutoReceiveBufferSizeMax: 256 408 | switchUdpSendBufferSize: 9 409 | switchUdpReceiveBufferSize: 42 410 | switchSocketBufferEfficiency: 4 411 | switchSocketInitializeEnabled: 1 412 | switchNetworkInterfaceManagerInitializeEnabled: 1 413 | switchPlayerConnectionEnabled: 1 414 | ps4NPAgeRating: 12 415 | ps4NPTitleSecret: 416 | ps4NPTrophyPackPath: 417 | ps4ParentalLevel: 11 418 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 419 | ps4Category: 0 420 | ps4MasterVersion: 01.00 421 | ps4AppVersion: 01.00 422 | ps4AppType: 0 423 | ps4ParamSfxPath: 424 | ps4VideoOutPixelFormat: 0 425 | ps4VideoOutInitialWidth: 1920 426 | ps4VideoOutBaseModeInitialWidth: 1920 427 | ps4VideoOutReprojectionRate: 60 428 | ps4PronunciationXMLPath: 429 | ps4PronunciationSIGPath: 430 | ps4BackgroundImagePath: 431 | ps4StartupImagePath: 432 | ps4StartupImagesFolder: 433 | ps4IconImagesFolder: 434 | ps4SaveDataImagePath: 435 | ps4SdkOverride: 436 | ps4BGMPath: 437 | ps4ShareFilePath: 438 | ps4ShareOverlayImagePath: 439 | ps4PrivacyGuardImagePath: 440 | ps4NPtitleDatPath: 441 | ps4RemotePlayKeyAssignment: -1 442 | ps4RemotePlayKeyMappingDir: 443 | ps4PlayTogetherPlayerCount: 0 444 | ps4EnterButtonAssignment: 1 445 | ps4ApplicationParam1: 0 446 | ps4ApplicationParam2: 0 447 | ps4ApplicationParam3: 0 448 | ps4ApplicationParam4: 0 449 | ps4DownloadDataSize: 0 450 | ps4GarlicHeapSize: 2048 451 | ps4ProGarlicHeapSize: 2560 452 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 453 | ps4pnSessions: 1 454 | ps4pnPresence: 1 455 | ps4pnFriends: 1 456 | ps4pnGameCustomData: 1 457 | playerPrefsSupport: 0 458 | enableApplicationExit: 0 459 | restrictedAudioUsageRights: 0 460 | ps4UseResolutionFallback: 0 461 | ps4ReprojectionSupport: 0 462 | ps4UseAudio3dBackend: 0 463 | ps4SocialScreenEnabled: 0 464 | ps4ScriptOptimizationLevel: 0 465 | ps4Audio3dVirtualSpeakerCount: 14 466 | ps4attribCpuUsage: 0 467 | ps4PatchPkgPath: 468 | ps4PatchLatestPkgPath: 469 | ps4PatchChangeinfoPath: 470 | ps4PatchDayOne: 0 471 | ps4attribUserManagement: 0 472 | ps4attribMoveSupport: 0 473 | ps4attrib3DSupport: 0 474 | ps4attribShareSupport: 0 475 | ps4attribExclusiveVR: 0 476 | ps4disableAutoHideSplash: 0 477 | ps4videoRecordingFeaturesUsed: 0 478 | ps4contentSearchFeaturesUsed: 0 479 | ps4attribEyeToEyeDistanceSettingVR: 0 480 | ps4IncludedModules: [] 481 | monoEnv: 482 | psp2Splashimage: {fileID: 0} 483 | psp2NPTrophyPackPath: 484 | psp2NPSupportGBMorGJP: 0 485 | psp2NPAgeRating: 12 486 | psp2NPTitleDatPath: 487 | psp2NPCommsID: 488 | psp2NPCommunicationsID: 489 | psp2NPCommsPassphrase: 490 | psp2NPCommsSig: 491 | psp2ParamSfxPath: 492 | psp2ManualPath: 493 | psp2LiveAreaGatePath: 494 | psp2LiveAreaBackroundPath: 495 | psp2LiveAreaPath: 496 | psp2LiveAreaTrialPath: 497 | psp2PatchChangeInfoPath: 498 | psp2PatchOriginalPackage: 499 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 500 | psp2KeystoneFile: 501 | psp2MemoryExpansionMode: 0 502 | psp2DRMType: 0 503 | psp2StorageType: 0 504 | psp2MediaCapacity: 0 505 | psp2DLCConfigPath: 506 | psp2ThumbnailPath: 507 | psp2BackgroundPath: 508 | psp2SoundPath: 509 | psp2TrophyCommId: 510 | psp2TrophyPackagePath: 511 | psp2PackagedResourcesPath: 512 | psp2SaveDataQuota: 10240 513 | psp2ParentalLevel: 1 514 | psp2ShortTitle: Not Set 515 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 516 | psp2Category: 0 517 | psp2MasterVersion: 01.00 518 | psp2AppVersion: 01.00 519 | psp2TVBootMode: 0 520 | psp2EnterButtonAssignment: 2 521 | psp2TVDisableEmu: 0 522 | psp2AllowTwitterDialog: 1 523 | psp2Upgradable: 0 524 | psp2HealthWarning: 0 525 | psp2UseLibLocation: 0 526 | psp2InfoBarOnStartup: 0 527 | psp2InfoBarColor: 0 528 | psp2ScriptOptimizationLevel: 0 529 | splashScreenBackgroundSourceLandscape: {fileID: 0} 530 | splashScreenBackgroundSourcePortrait: {fileID: 0} 531 | spritePackerPolicy: 532 | webGLMemorySize: 256 533 | webGLExceptionSupport: 1 534 | webGLNameFilesAsHashes: 0 535 | webGLDataCaching: 0 536 | webGLDebugSymbols: 0 537 | webGLEmscriptenArgs: 538 | webGLModulesDirectory: 539 | webGLTemplate: APPLICATION:Default 540 | webGLAnalyzeBuildSize: 0 541 | webGLUseEmbeddedResources: 0 542 | webGLCompressionFormat: 1 543 | webGLLinkerTarget: 0 544 | scriptingDefineSymbols: 545 | 1: UNITY_POST_PROCESSING_STACK_V2 546 | 4: UNITY_POST_PROCESSING_STACK_V2 547 | 7: UNITY_POST_PROCESSING_STACK_V2 548 | 13: UNITY_POST_PROCESSING_STACK_V2 549 | 17: UNITY_POST_PROCESSING_STACK_V2 550 | 18: UNITY_POST_PROCESSING_STACK_V2 551 | 19: UNITY_POST_PROCESSING_STACK_V2 552 | 21: UNITY_POST_PROCESSING_STACK_V2 553 | 23: UNITY_POST_PROCESSING_STACK_V2 554 | 24: UNITY_POST_PROCESSING_STACK_V2 555 | 25: UNITY_POST_PROCESSING_STACK_V2 556 | 26: UNITY_POST_PROCESSING_STACK_V2 557 | 27: UNITY_POST_PROCESSING_STACK_V2 558 | platformArchitecture: {} 559 | scriptingBackend: {} 560 | il2cppCompilerConfiguration: {} 561 | incrementalIl2cppBuild: {} 562 | allowUnsafeCode: 0 563 | additionalIl2CppArgs: 564 | scriptingRuntimeVersion: 0 565 | apiCompatibilityLevelPerPlatform: {} 566 | m_RenderingPath: 1 567 | m_MobileRenderingPath: 1 568 | metroPackageName: Template_3D 569 | metroPackageVersion: 570 | metroCertificatePath: 571 | metroCertificatePassword: 572 | metroCertificateSubject: 573 | metroCertificateIssuer: 574 | metroCertificateNotAfter: 0000000000000000 575 | metroApplicationDescription: Template_3D 576 | wsaImages: {} 577 | metroTileShortName: 578 | metroTileShowName: 0 579 | metroMediumTileShowName: 0 580 | metroLargeTileShowName: 0 581 | metroWideTileShowName: 0 582 | metroDefaultTileSize: 1 583 | metroTileForegroundText: 2 584 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 585 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 586 | a: 1} 587 | metroSplashScreenUseBackgroundColor: 0 588 | platformCapabilities: {} 589 | metroFTAName: 590 | metroFTAFileTypes: [] 591 | metroProtocolName: 592 | metroCompilationOverrides: 1 593 | n3dsUseExtSaveData: 0 594 | n3dsCompressStaticMem: 1 595 | n3dsExtSaveDataNumber: 0x12345 596 | n3dsStackSize: 131072 597 | n3dsTargetPlatform: 2 598 | n3dsRegion: 7 599 | n3dsMediaSize: 0 600 | n3dsLogoStyle: 3 601 | n3dsTitle: GameName 602 | n3dsProductCode: 603 | n3dsApplicationId: 0xFF3FF 604 | XboxOneProductId: 605 | XboxOneUpdateKey: 606 | XboxOneSandboxId: 607 | XboxOneContentId: 608 | XboxOneTitleId: 609 | XboxOneSCId: 610 | XboxOneGameOsOverridePath: 611 | XboxOnePackagingOverridePath: 612 | XboxOneAppManifestOverridePath: 613 | XboxOneVersion: 1.0.0.0 614 | XboxOnePackageEncryption: 0 615 | XboxOnePackageUpdateGranularity: 2 616 | XboxOneDescription: 617 | XboxOneLanguage: 618 | - enus 619 | XboxOneCapability: [] 620 | XboxOneGameRating: {} 621 | XboxOneIsContentPackage: 0 622 | XboxOneEnableGPUVariability: 0 623 | XboxOneSockets: {} 624 | XboxOneSplashScreen: {fileID: 0} 625 | XboxOneAllowedProductIds: [] 626 | XboxOnePersistentLocalStorageSize: 0 627 | XboxOneXTitleMemory: 8 628 | xboxOneScriptCompiler: 0 629 | vrEditorSettings: 630 | daydream: 631 | daydreamIconForeground: {fileID: 0} 632 | daydreamIconBackground: {fileID: 0} 633 | cloudServicesEnabled: 634 | UNet: 1 635 | facebookSdkVersion: 7.9.4 636 | apiCompatibilityLevel: 2 637 | cloudProjectId: 67025b91-d87a-4e4e-99f5-67c47ed03c4a 638 | projectName: Unity-Null-Reference-Detection 639 | organizationId: maltewei 640 | cloudEnabled: 0 641 | enableNativePlatformBackendsForNewInputSystem: 0 642 | disableOldInputManagerSupport: 0 643 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.2.0b1 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: 4 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: 2 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: 40 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: 1 136 | antiAliasing: 4 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: 1 164 | antiAliasing: 4 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 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /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 | - PostProcessing 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 | # Finding null references in Unity 2 | 3 | ![alt text](https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/master/Documentation/screenshot.png "screenshot") 4 | 5 | This handy Unity plug-in helps you to find `null references` in your scene objects to avoid runtime exceptions. It's lightweight and both easy to install and to use. 6 | 7 | ## Setup 8 | 9 | If you want to get a quick overview you should check out the [demo project](https://github.com/Moolt/Unity-Null-Reference-Detection/archive/master.zip). 10 | You can also download the [package](https://github.com/Moolt/Unity-Null-Reference-Detection/raw/master/null-reference-detection.unitypackage) containing only the essential scripts. 11 | 12 | After downloading and importing the package, you will find a new entry under `Tools > Find Null References`. 13 | 14 | ## How to use 15 | 16 | In the screenshot above there's a cube with a script containing three references. Here's the example code: 17 | 18 | ```csharp 19 | using NullReferenceDetection; 20 | using UnityEngine; 21 | 22 | public class CubeScript : MonoBehaviour { 23 | 24 | [SerializeField] 25 | //Serialized, private fields are visible in the inspector 26 | private SphereScript sphere; 27 | 28 | [ValueRequired] 29 | //Will be shown as red text if null 30 | public CapsuleScript capsule; 31 | 32 | [ValueOptional] 33 | //Won't be shown even if null 34 | public CylinderScript cylinder; 35 | } 36 | ``` 37 | 38 | All fields that appear in the `Unity Inspector` will also be checked for `null` by the plug-in. That includes `public` fields and `serialized private` fields. 39 | 40 | In addition you can use two custom attributes to further specify how your fields should be handled: 41 | * `[ValueRequired]` will print a red error message if null 42 | * `[ValueOptional]`won't show in the console even if null 43 | 44 | __Using these custom attributes is purely optional__. 45 | 46 | If you now execute the plug-in via `Tools > Find Null References` the console will show two error messages, like in the screenshot above. The `capsule` reference is marked as `required`, therefore it's show as red. `sphere` is shown with the default severity and `cylinder` is not shown at all as the `[ValueOptional]` attribute allows the field to be a `null` reference. 47 | 48 | ## Project Settings 49 | 50 | You can open the preferences window by navigating to `Edit -> Project Settings -> Null Reference Detection` where you can define which occurences of null references should be printed to the console. You can also change their text color. 51 | 52 | If you want to automatically check for null references, you can do so by activating checks on entering play mode or on compilation. You can also prevent Unity from entering play mode if any null references were found. 53 | 54 | ![alt text](https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/master/Documentation/settings_screen.png "preferences") 55 | 56 | Additionally in the preferences window you can define a list of GameObjects for which null references will be ignored, this is like the [ValueOptional] tag but affects the entire GameObject (and it's children, if the checkbox is ticked). 57 | 58 | ![alt text](https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/master/Documentation/settings_screen_ignore.png "ignore list") 59 | 60 | Finaly, by default the plug-in only scans GameObjects which are in the scene. If you have additional prefabs which are only instanciated at run-time, but you would like them to also be checked by the plug-in you can add the path to the prefab here. 61 | 62 | ![alt text](https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/master/Documentation/settings_screen_prefabs.png "prefabs") 63 | 64 | 65 | ## Extension 66 | 67 | By inheriting from the abstract `BaseAttribute` class you can implement your own attributes. They will also show up in the preferences window where you assign a color of your choice to your custom attribute. 68 | 69 | ## Good to know 70 | 71 | Clicking on an error message will highlight the target object in the `Hierarchy`, or if the target object is in a prefab it will highlight the folder in the `Project` panel. 72 | 73 | The save files for the preferences are plain text files, aiding in ease of use so that you can easily see what was added or removed when staging files or working on a merge request etc. 74 | 75 | ## The plug-in does not... 76 | * check list items for null references. 77 | * check for properties of default unity components (such as transform, box collider etc.) 78 | * consider objects in other scenes but the currently opened scene. 79 | * consider inactive objects. 80 | * automatically update the entry of a prefab if the filename or path changes 81 | 82 | -------------------------------------------------------------------------------- /null-reference-detection.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moolt/Unity-Null-Reference-Detection/0c8d499e5f25e9d3b89dabc0bfec150dfce43d30/null-reference-detection.unitypackage --------------------------------------------------------------------------------