├── .editorconfig
├── .github
└── FUNDING.yml
├── Documentation
├── AssetValidatorEditorWindow.png
├── AssetValidatorEditorWindow.png.meta
├── AssetValidatorMenuItems.png
├── AssetValidatorMenuItems.png.meta
├── license.txt
└── license.txt.meta
├── License.txt
├── README.md
├── Unity
├── .gitignore
├── Assets
│ ├── DevTools.meta
│ ├── DevTools
│ │ ├── Scenes.meta
│ │ └── Scenes
│ │ │ ├── EmptyScene.unity
│ │ │ └── EmptyScene.unity.meta
│ ├── JCMG.meta
│ ├── JCMG
│ │ ├── AssetValidator.meta
│ │ └── AssetValidator
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── AssemblyInfo.cs.meta
│ │ │ ├── Editor.meta
│ │ │ ├── Editor
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── AssemblyInfo.cs.meta
│ │ │ ├── AssetValidatorEditorWindow.cs
│ │ │ ├── AssetValidatorEditorWindow.cs.meta
│ │ │ ├── AssetValidatorMenuItems.cs
│ │ │ ├── AssetValidatorMenuItems.cs.meta
│ │ │ ├── Config.meta
│ │ │ ├── Config
│ │ │ │ ├── AssetValidatorOverrideConfig.cs
│ │ │ │ ├── AssetValidatorOverrideConfig.cs.meta
│ │ │ │ ├── Resources.meta
│ │ │ │ └── Resources
│ │ │ │ │ ├── AssetValidatorOverrideConfig.asset
│ │ │ │ │ └── AssetValidatorOverrideConfig.asset.meta
│ │ │ ├── Contracts.meta
│ │ │ ├── Contracts
│ │ │ │ ├── AssetBundlePathContract.cs
│ │ │ │ ├── AssetBundlePathContract.cs.meta
│ │ │ │ ├── ResourcePathContract.cs
│ │ │ │ └── ResourcePathContract.cs.meta
│ │ │ ├── Display.meta
│ │ │ ├── Display
│ │ │ │ ├── LogGroupingMode.cs
│ │ │ │ ├── LogGroupingMode.cs.meta
│ │ │ │ ├── ValidationLogTreeView.cs
│ │ │ │ ├── ValidationLogTreeView.cs.meta
│ │ │ │ ├── ValidationLogTreeViewHeader.cs
│ │ │ │ ├── ValidationLogTreeViewHeader.cs.meta
│ │ │ │ ├── ValidationLogTreeViewItem.cs
│ │ │ │ └── ValidationLogTreeViewItem.cs.meta
│ │ │ ├── EditorConstants.cs
│ │ │ ├── EditorConstants.cs.meta
│ │ │ ├── Extensions.meta
│ │ │ ├── Extensions
│ │ │ │ ├── FileOutputFormatExtensions.cs
│ │ │ │ ├── FileOutputFormatExtensions.cs.meta
│ │ │ │ ├── TransformExtensions.cs
│ │ │ │ └── TransformExtensions.cs.meta
│ │ │ ├── Inspector.meta
│ │ │ ├── Inspector
│ │ │ │ ├── AssetValidatorOverrideConfigInspector.cs
│ │ │ │ └── AssetValidatorOverrideConfigInspector.cs.meta
│ │ │ ├── JCMG.AssetValidator.Editor.asmdef
│ │ │ ├── JCMG.AssetValidator.Editor.asmdef.meta
│ │ │ ├── Meta.meta
│ │ │ ├── Meta
│ │ │ │ ├── ClassTypeCache.cs
│ │ │ │ ├── ClassTypeCache.cs.meta
│ │ │ │ ├── CrossSceneValidatorCache.cs
│ │ │ │ ├── CrossSceneValidatorCache.cs.meta
│ │ │ │ ├── InstanceValidatorCache.cs
│ │ │ │ ├── InstanceValidatorCache.cs.meta
│ │ │ │ ├── ProjectValidatorCache.cs
│ │ │ │ ├── ProjectValidatorCache.cs.meta
│ │ │ │ ├── SortedEnum.cs
│ │ │ │ └── SortedEnum.cs.meta
│ │ │ ├── Output.meta
│ │ │ ├── Output
│ │ │ │ ├── FileOutputFormat.cs
│ │ │ │ ├── FileOutputFormat.cs.meta
│ │ │ │ ├── LogCache.cs
│ │ │ │ ├── LogCache.cs.meta
│ │ │ │ ├── LogFileWriter.cs
│ │ │ │ ├── LogFileWriter.cs.meta
│ │ │ │ ├── LogSource.cs
│ │ │ │ ├── LogSource.cs.meta
│ │ │ │ ├── LogType.cs
│ │ │ │ ├── LogType.cs.meta
│ │ │ │ ├── ValidationLog.cs
│ │ │ │ └── ValidationLog.cs.meta
│ │ │ ├── Tests.meta
│ │ │ ├── Tests
│ │ │ │ ├── JCMG.AssetValidator.Editor.Tests.asmdef
│ │ │ │ ├── JCMG.AssetValidator.Editor.Tests.asmdef.meta
│ │ │ │ ├── Meta.meta
│ │ │ │ ├── Meta
│ │ │ │ │ ├── ClassTypeCacheTests.cs
│ │ │ │ │ ├── ClassTypeCacheTests.cs.meta
│ │ │ │ │ ├── ReflectionUtilityTests.cs
│ │ │ │ │ ├── ReflectionUtilityTests.cs.meta
│ │ │ │ │ ├── SortedEnumTests.cs
│ │ │ │ │ └── SortedEnumTests.cs.meta
│ │ │ │ ├── Tools.meta
│ │ │ │ ├── Tools
│ │ │ │ │ ├── ContinuousIntegrationToolsExamples.cs
│ │ │ │ │ └── ContinuousIntegrationToolsExamples.cs.meta
│ │ │ │ ├── Validators.meta
│ │ │ │ └── Validators
│ │ │ │ │ ├── FieldValidators.meta
│ │ │ │ │ ├── FieldValidators
│ │ │ │ │ ├── FieldValidatorTests.cs
│ │ │ │ │ ├── FieldValidatorTests.cs.meta
│ │ │ │ │ ├── IsProjectReferenceValidatorTests.cs
│ │ │ │ │ ├── IsProjectReferenceValidatorTests.cs.meta
│ │ │ │ │ ├── IsSceneReferenceValidatorTests.cs
│ │ │ │ │ ├── IsSceneReferenceValidatorTests.cs.meta
│ │ │ │ │ ├── NonNullValidatorTests.cs
│ │ │ │ │ ├── NonNullValidatorTests.cs.meta
│ │ │ │ │ ├── ResourcePathValidatorTests.cs
│ │ │ │ │ └── ResourcePathValidatorTests.cs.meta
│ │ │ │ │ ├── ObjectValidators.meta
│ │ │ │ │ ├── ObjectValidators
│ │ │ │ │ ├── ObjectValidatorTests.cs
│ │ │ │ │ ├── ObjectValidatorTests.cs.meta
│ │ │ │ │ ├── RequireComponentValidatorTests.cs
│ │ │ │ │ ├── RequireComponentValidatorTests.cs.meta
│ │ │ │ │ ├── ZeroChildrenValidatorTests.cs
│ │ │ │ │ └── ZeroChildrenValidatorTests.cs.meta
│ │ │ │ │ ├── ProjectValidatorTests.cs
│ │ │ │ │ ├── ProjectValidatorTests.cs.meta
│ │ │ │ │ ├── ProjectValidators.meta
│ │ │ │ │ ├── ProjectValidators
│ │ │ │ │ ├── AssetBundlePathProjectValidatorTests.cs
│ │ │ │ │ ├── AssetBundlePathProjectValidatorTests.cs.meta
│ │ │ │ │ ├── ResourceContractProjectValidatorTests.cs
│ │ │ │ │ └── ResourceContractProjectValidatorTests.cs.meta
│ │ │ │ │ ├── SceneValidatorTests.cs
│ │ │ │ │ └── SceneValidatorTests.cs.meta
│ │ │ ├── Tools.meta
│ │ │ ├── Tools
│ │ │ │ ├── CommandLineTools.cs
│ │ │ │ ├── CommandLineTools.cs.meta
│ │ │ │ ├── ContinuousIntegrationTools.cs
│ │ │ │ ├── ContinuousIntegrationTools.cs.meta
│ │ │ │ ├── FileTools.cs
│ │ │ │ ├── FileTools.cs.meta
│ │ │ │ ├── GraphicsTools.cs
│ │ │ │ ├── GraphicsTools.cs.meta
│ │ │ │ ├── ObjectTools.cs
│ │ │ │ ├── ObjectTools.cs.meta
│ │ │ │ ├── ProjectTools.cs
│ │ │ │ ├── ProjectTools.cs.meta
│ │ │ │ ├── ReflectionTools.cs
│ │ │ │ ├── ReflectionTools.cs.meta
│ │ │ │ ├── ValidationLogTreeViewTools.cs
│ │ │ │ └── ValidationLogTreeViewTools.cs.meta
│ │ │ ├── Validators.meta
│ │ │ └── Validators
│ │ │ │ ├── AbstractInstanceValidator.cs
│ │ │ │ ├── AbstractInstanceValidator.cs.meta
│ │ │ │ ├── AssetValidatorRunner.cs
│ │ │ │ ├── AssetValidatorRunner.cs.meta
│ │ │ │ ├── CrossSceneValidators.meta
│ │ │ │ ├── CrossSceneValidators
│ │ │ │ ├── CrossSceneValidatorBase.cs
│ │ │ │ ├── CrossSceneValidatorBase.cs.meta
│ │ │ │ ├── EnsureComponentIsUniqueValidator.cs
│ │ │ │ ├── EnsureComponentIsUniqueValidator.cs.meta
│ │ │ │ ├── MissingReferenceValidator.cs
│ │ │ │ ├── MissingReferenceValidator.cs.meta
│ │ │ │ ├── MultipleEventSystemsValidator.cs
│ │ │ │ ├── MultipleEventSystemsValidator.cs.meta
│ │ │ │ ├── MultipleMainCamerasValidator.cs
│ │ │ │ └── MultipleMainCamerasValidator.cs.meta
│ │ │ │ ├── Documentation.meta
│ │ │ │ ├── Documentation
│ │ │ │ ├── ValidatorDescriptionAttribute.cs
│ │ │ │ ├── ValidatorDescriptionAttribute.cs.meta
│ │ │ │ ├── ValidatorExampleAttribute.cs
│ │ │ │ └── ValidatorExampleAttribute.cs.meta
│ │ │ │ ├── FieldValidators.meta
│ │ │ │ ├── FieldValidators
│ │ │ │ ├── FieldValidatorAttribute.cs
│ │ │ │ ├── FieldValidatorAttribute.cs.meta
│ │ │ │ ├── FieldValidatorBase.cs
│ │ │ │ ├── FieldValidatorBase.cs.meta
│ │ │ │ ├── IsProjectReferenceFieldValidator.cs
│ │ │ │ ├── IsProjectReferenceFieldValidator.cs.meta
│ │ │ │ ├── IsSceneReferenceFieldValidator.cs
│ │ │ │ ├── IsSceneReferenceFieldValidator.cs.meta
│ │ │ │ ├── NonNullFieldValidator.cs
│ │ │ │ ├── NonNullFieldValidator.cs.meta
│ │ │ │ ├── ResourcePathFieldValidator.cs
│ │ │ │ └── ResourcePathFieldValidator.cs.meta
│ │ │ │ ├── Managers.meta
│ │ │ │ ├── Managers
│ │ │ │ ├── ActiveSceneValidatorManager.cs
│ │ │ │ ├── ActiveSceneValidatorManager.cs.meta
│ │ │ │ ├── CrossSceneValidatorManager.cs
│ │ │ │ ├── CrossSceneValidatorManager.cs.meta
│ │ │ │ ├── InstanceValidatorManagerBase.cs
│ │ │ │ ├── InstanceValidatorManagerBase.cs.meta
│ │ │ │ ├── ProjectAssetValidatorManager.cs
│ │ │ │ ├── ProjectAssetValidatorManager.cs.meta
│ │ │ │ ├── ValidatorManagerBase.cs
│ │ │ │ └── ValidatorManagerBase.cs.meta
│ │ │ │ ├── ObjectValidators.meta
│ │ │ │ ├── ObjectValidators
│ │ │ │ ├── HasComponentObjectValidator.cs
│ │ │ │ ├── HasComponentObjectValidator.cs.meta
│ │ │ │ ├── ObjectValidatorAttribute.cs
│ │ │ │ ├── ObjectValidatorAttribute.cs.meta
│ │ │ │ ├── ObjectValidatorBase.cs
│ │ │ │ ├── ObjectValidatorBase.cs.meta
│ │ │ │ ├── ZeroChildrenObjectValidator.cs
│ │ │ │ └── ZeroChildrenObjectValidator.cs.meta
│ │ │ │ ├── OnlyIncludeInTestsAttribute.cs
│ │ │ │ ├── OnlyIncludeInTestsAttribute.cs.meta
│ │ │ │ ├── ProjectValidators.meta
│ │ │ │ ├── ProjectValidators
│ │ │ │ ├── AssetBundlePathProjectValidator.cs
│ │ │ │ ├── AssetBundlePathProjectValidator.cs.meta
│ │ │ │ ├── AssetProjectValidatorBase.cs
│ │ │ │ ├── AssetProjectValidatorBase.cs.meta
│ │ │ │ ├── ProjectValidatorBase.cs
│ │ │ │ ├── ProjectValidatorBase.cs.meta
│ │ │ │ ├── ResourceContractProjectValidator.cs
│ │ │ │ └── ResourceContractProjectValidator.cs.meta
│ │ │ │ ├── SceneValidationMode.cs
│ │ │ │ ├── SceneValidationMode.cs.meta
│ │ │ │ ├── ValidatorAttribute.cs
│ │ │ │ └── ValidatorAttribute.cs.meta
│ │ │ ├── FieldAttributes.meta
│ │ │ ├── FieldAttributes
│ │ │ ├── FieldAttribute.cs
│ │ │ ├── FieldAttribute.cs.meta
│ │ │ ├── IsProjectReferenceAttribute.cs
│ │ │ ├── IsProjectReferenceAttribute.cs.meta
│ │ │ ├── IsSceneReferenceAttribute.cs
│ │ │ ├── IsSceneReferenceAttribute.cs.meta
│ │ │ ├── NonNullAttribute.cs
│ │ │ ├── NonNullAttribute.cs.meta
│ │ │ ├── ResourcePathAttribute.cs
│ │ │ └── ResourcePathAttribute.cs.meta
│ │ │ ├── JCMG.AssetValidator.asmdef
│ │ │ ├── JCMG.AssetValidator.asmdef.meta
│ │ │ ├── ObjectAttributes.meta
│ │ │ ├── ObjectAttributes
│ │ │ ├── HasComponentAttribute.cs
│ │ │ ├── HasComponentAttribute.cs.meta
│ │ │ ├── ValidateAttribute.cs
│ │ │ ├── ValidateAttribute.cs.meta
│ │ │ ├── ZeroChildrenAttribute.cs
│ │ │ └── ZeroChildrenAttribute.cs.meta
│ │ │ ├── Tests.meta
│ │ │ ├── Tests
│ │ │ ├── MonoBehaviourTwo.cs
│ │ │ ├── MonoBehaviourTwo.cs.meta
│ │ │ ├── ValidatedMonoBehaviourTwo.cs
│ │ │ ├── ValidatedMonoBehaviourTwo.cs.meta
│ │ │ ├── resource_unit_test.meta
│ │ │ ├── resource_unit_test
│ │ │ │ ├── ProjectPrefabSearchTest.prefab
│ │ │ │ ├── ProjectPrefabSearchTest.prefab.meta
│ │ │ │ ├── readme.md
│ │ │ │ └── readme.md.meta
│ │ │ ├── unit_test_bundle.meta
│ │ │ └── unit_test_bundle
│ │ │ │ ├── bundle_item.unity
│ │ │ │ ├── bundle_item.unity.meta
│ │ │ │ ├── readme.md
│ │ │ │ └── readme.md.meta
│ │ │ ├── UnityTargetType.cs
│ │ │ └── UnityTargetType.cs.meta
│ ├── PackageManifests.meta
│ └── PackageManifests
│ │ ├── Generated.meta
│ │ ├── Generated
│ │ ├── 0875fa0f-60cd-4029-8332-bf279970c816.meta
│ │ └── 0875fa0f-60cd-4029-8332-bf279970c816
│ │ │ ├── package.json
│ │ │ └── package.json.meta
│ │ ├── PackageManifestConfig.asset
│ │ └── PackageManifestConfig.asset.meta
├── JCMG.AssetValidator.Editor.Tests.csproj.DotSettings
├── JCMG.AssetValidator.Editor.csproj.DotSettings
├── JCMG.AssetValidator.csproj.DotSettings
├── Packages
│ └── manifest.json
└── ProjectSettings
│ ├── AudioManager.asset
│ ├── ClusterInputManager.asset
│ ├── DynamicsManager.asset
│ ├── EditorBuildSettings.asset
│ ├── EditorSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── NavMeshAreas.asset
│ ├── NetworkManager.asset
│ ├── Physics2DSettings.asset
│ ├── PresetManager.asset
│ ├── ProjectSettings.asset
│ ├── ProjectVersion.txt
│ ├── QualitySettings.asset
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── UnityConnectSettings.asset
│ └── VFXManager.asset
├── contributors.md
└── usage.md
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 | # github: [jeffcampbellmakesgames]
3 | ko_fi: stampyturtle
4 |
--------------------------------------------------------------------------------
/Documentation/AssetValidatorEditorWindow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-asset-validator/5015ee510fe9d5e096b0ecd961b1cf16d646111e/Documentation/AssetValidatorEditorWindow.png
--------------------------------------------------------------------------------
/Documentation/AssetValidatorEditorWindow.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 40d0c33bea346b24facfcaba8041f801
3 | timeCreated: 1516912897
4 | licenseType: Pro
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 4
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -1
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
49 | spritePixelsToUnits: 100
50 | alphaUsage: 1
51 | alphaIsTransparency: 1
52 | spriteTessellationDetail: -1
53 | textureType: 8
54 | textureShape: 1
55 | maxTextureSizeSet: 0
56 | compressionQualitySet: 0
57 | textureFormatSet: 0
58 | platformSettings:
59 | - buildTarget: DefaultTexturePlatform
60 | maxTextureSize: 2048
61 | resizeAlgorithm: 0
62 | textureFormat: -1
63 | textureCompression: 1
64 | compressionQuality: 50
65 | crunchedCompression: 0
66 | allowsAlphaSplitting: 0
67 | overridden: 0
68 | androidETC2FallbackOverride: 0
69 | spriteSheet:
70 | serializedVersion: 2
71 | sprites: []
72 | outline: []
73 | physicsShape: []
74 | spritePackingTag:
75 | userData:
76 | assetBundleName:
77 | assetBundleVariant:
78 |
--------------------------------------------------------------------------------
/Documentation/AssetValidatorMenuItems.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-asset-validator/5015ee510fe9d5e096b0ecd961b1cf16d646111e/Documentation/AssetValidatorMenuItems.png
--------------------------------------------------------------------------------
/Documentation/AssetValidatorMenuItems.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5fa0924806ed8614583b834d36f08734
3 | timeCreated: 1516916522
4 | licenseType: Pro
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 4
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -1
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: 1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 1
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
49 | spritePixelsToUnits: 100
50 | alphaUsage: 1
51 | alphaIsTransparency: 1
52 | spriteTessellationDetail: -1
53 | textureType: 8
54 | textureShape: 1
55 | maxTextureSizeSet: 0
56 | compressionQualitySet: 0
57 | textureFormatSet: 0
58 | platformSettings:
59 | - buildTarget: DefaultTexturePlatform
60 | maxTextureSize: 2048
61 | resizeAlgorithm: 0
62 | textureFormat: -1
63 | textureCompression: 1
64 | compressionQuality: 50
65 | crunchedCompression: 0
66 | allowsAlphaSplitting: 0
67 | overridden: 0
68 | androidETC2FallbackOverride: 0
69 | spriteSheet:
70 | serializedVersion: 2
71 | sprites: []
72 | outline: []
73 | physicsShape: []
74 | spritePackingTag:
75 | userData:
76 | assetBundleName:
77 | assetBundleVariant:
78 |
--------------------------------------------------------------------------------
/Documentation/license.txt:
--------------------------------------------------------------------------------
1 | AssetValidator
2 | Copyright (c) 2019 Jeff Campbell
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Documentation/license.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab4c578a1ac7cbb4a870e7c686f4599f
3 | timeCreated: 1516803522
4 | licenseType: Free
5 | TextScriptImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/License.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Jeff Campbell
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.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Asset Validator
3 | The official repository for Asset Validator, an editor tool for validating assets in the project and in scenes.
4 |
5 | **NOTE:** _I have archived this as I've personally adopted the OdinValidator tool found [here](https://odininspector.com/odin-project-validator) in serving the same role. If anyone is interested in adopting this and continuing on, feel free!_
6 |
7 | - _ Jeff Campbell _
8 |
9 | 
10 |
11 | ## Overview
12 | The AssetValidator is an editor tool for validating scenes and assets. It makes substantial use of C# Reflection to infer which types should be validated and in which context.
13 |
14 | ## Importing JCMG Asset Validator
15 | Using this library in your project can be done in two ways:
16 | * **Releases:** The latest release can be found [here](https://github.com/jeffcampbellmakesgames/unity-asset-validator/releases) as a UnityPackage file that can be downloaded and imported directly into your project's Assets folder.
17 | * **Package:** Using the native Unity Package Manager introduced in 2017.2, you can add this library as a package by modifying your `manifest.json` file found at `/ProjectName/Packages/manifest.json` to include it as a dependency. See the example below on how to reference it.
18 |
19 | ```
20 | {
21 | "dependencies": {
22 | ...
23 | "com.jeffcampbellmakesgames.assetvalidator" : "https://github.com/jeffcampbellmakesgames/unity-asset-validator.git#release/stable"
24 | ...
25 | }
26 | }
27 | ```
28 |
29 | ## Contributors
30 | If you are interested in contributing, found a bug, or want to request a new feature, please see [here](./contributors.md) for more information.
31 |
32 | ## Unity Editor Compatibility
33 | Greater than or equal to 2017.4.X LTS
34 |
35 | ## Roadmap
36 | The roadmap for this project can be seen on the public trello board found here: https://trello.com/b/hDEXoZ7G
37 |
38 | ## License
39 | MIT License
40 |
41 | Copyright (c) 2019 Jeff Campbell
42 |
43 | Permission is hereby granted, free of charge, to any person obtaining a copy
44 | of this software and associated documentation files (the "Software"), to deal
45 | in the Software without restriction, including without limitation the rights
46 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
47 | copies of the Software, and to permit persons to whom the Software is
48 | furnished to do so, subject to the following conditions:
49 |
50 | The above copyright notice and this permission notice shall be included in all
51 | copies or substantial portions of the Software.
52 |
53 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
59 | SOFTWARE.
60 |
--------------------------------------------------------------------------------
/Unity/.gitignore:
--------------------------------------------------------------------------------
1 | # =============== #
2 | # Unity generated #
3 | # =============== #
4 | [Ll]ogs/
5 | [Tt]emp/
6 | [Oo]bj/
7 | [Bb]uild
8 | /[Ll]ibrary/
9 | sysinfo.txt
10 | *.stackdump
11 |
12 | # JetBrains Plugin
13 | JetBrains/
14 | JetBrains.meta
15 |
16 | # ============================================= #
17 | # Visual Studio / MonoDevelop / Rider generated #
18 | # ============================================= #
19 | [Ee]xported[Oo]bj/
20 | .vs/
21 | /*.userprefs
22 | /*.csproj
23 | /*.pidb
24 | /*.suo
25 | /*.sln*
26 | /*.user
27 | /*.unityproj
28 | /*.booproj
29 | /.idea*/
30 |
31 | # ============ #
32 | # OS generated #
33 | # ============ #
34 | .DS_Store*
35 | ._*
36 | .Spotlight-V100
37 | .Trashes
38 | ehthumbs.db
39 | [Tt]humbs.db
40 | [Dd]esktop.ini
41 |
42 | # ============ #
43 | # Plugin #
44 | # ============ #
45 | Assets/ThirdPartyTools/Ludiq/*/Generated/
46 | Assets/ThirdPartyTools/Ludiq/*/Generated.meta
--------------------------------------------------------------------------------
/Unity/Assets/DevTools.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 51d6b4de3f5669341a38ab4ca023caa2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/DevTools/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c743afb73a1a03748ad94e3ae005e3ed
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/DevTools/Scenes/EmptyScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0de5b8aff8e34ce4994310c2181eede8
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dfae9962ce1f6394c92b9f12d80bd0c6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 571d1d0028a652f42b0195a37a5802eb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Runtime.CompilerServices;
25 |
26 | [assembly: InternalsVisibleTo("JCMG.AssetValidator.Editor")]
27 | [assembly: InternalsVisibleTo("JCMG.AssetValidator.Editor.Tests")]
28 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e5e1e0278beae414da51a96e7aff9238
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9098406fc0f07f349b2e7593897e2fbd
3 | folderAsset: yes
4 | timeCreated: 1509839176
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Runtime.CompilerServices;
25 |
26 | [assembly: InternalsVisibleTo("JCMG.AssetValidator.Editor.Tests")]
27 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f6c3125eef94a464ba7d4de7f3d6c6ee
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/AssetValidatorEditorWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f98a7760103582041ae33baba201652d
3 | timeCreated: 1509979584
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/AssetValidatorMenuItems.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEditor;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | internal static class AssetValidatorMenuItems
29 | {
30 | [MenuItem("Tools/AssetValidator/Validate Project Assets", false, priority = 11)]
31 | public static void ValidateAllAssetsInAssetFolder()
32 | {
33 | AssetValidatorEditorWindow.LaunchWindowWithValidation(
34 | SceneValidationMode.None,
35 | FileOutputFormat.None);
36 | }
37 |
38 | [MenuItem("Tools/AssetValidator/Validate Active Scene", priority = 12)]
39 | public static void ValidateAllAssetsInActiveScene()
40 | {
41 | AssetValidatorEditorWindow.LaunchWindowWithValidation(
42 | SceneValidationMode.ActiveScene,
43 | FileOutputFormat.None);
44 | }
45 |
46 | [MenuItem("Tools/AssetValidator/Validate All Scenes", priority = 15)]
47 | public static void ValidateAllAssetsInAllScenes()
48 | {
49 | AssetValidatorEditorWindow.LaunchWindowWithValidation(
50 | SceneValidationMode.AllScenes,
51 | FileOutputFormat.None);
52 | }
53 |
54 | [MenuItem("Tools/AssetValidator/Validate All Scenes in Build Settings", priority = 13)]
55 | public static void ValidateAllAssetsInAllScenesInBuildSettings()
56 | {
57 | AssetValidatorEditorWindow.LaunchWindowWithValidation(
58 | SceneValidationMode.AllBuildScenes,
59 | FileOutputFormat.None);
60 | }
61 |
62 | [MenuItem("Tools/AssetValidator/Validate All Scenes in Build Settings and Asset Bundles", priority = 14)]
63 | public static void ValidateAllAssetsInAllScenesInBuildSettingsAndAssetBundles()
64 | {
65 | AssetValidatorEditorWindow.LaunchWindowWithValidation(
66 | SceneValidationMode.AllBuildAndAssetBundleScenes,
67 | FileOutputFormat.None);
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/AssetValidatorMenuItems.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0f8df43303f867840a34019aef06856b
3 | timeCreated: 1510427267
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Config.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e1087ed8ea46df04580c9cdd3d967837
3 | folderAsset: yes
4 | timeCreated: 1512487071
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Config/AssetValidatorOverrideConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7531f9b7970924c44afc005280ea7842
3 | timeCreated: 1512487090
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Config/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 84e9b106f204c504480d863b0d0b3406
3 | folderAsset: yes
4 | timeCreated: 1514390417
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Config/Resources/AssetValidatorOverrideConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInternal: {fileID: 0}
8 | m_GameObject: {fileID: 0}
9 | m_Enabled: 1
10 | m_EditorHideFlags: 0
11 | m_Script: {fileID: 11500000, guid: 7531f9b7970924c44afc005280ea7842, type: 3}
12 | m_Name: AssetValidatorOverrideConfig
13 | m_EditorClassIdentifier:
14 | _overrideItems:
15 | - enabled: 1
16 | symbol: cross_scene_missing_component_reference
17 | - enabled: 1
18 | symbol: cross_scene_multiple_event_systems
19 | - enabled: 1
20 | symbol: cross_scene_multiple_cameras
21 | - enabled: 1
22 | symbol: field_project_reference_validator
23 | - enabled: 1
24 | symbol: field_scene_reference_validator
25 | - enabled: 1
26 | symbol: field_non_null_validator
27 | - enabled: 1
28 | symbol: field_resource_path_validator
29 | - enabled: 1
30 | symbol: object_require_component_validator
31 | - enabled: 1
32 | symbol: object_zero_children_validator
33 | - enabled: 1
34 | symbol: project_asset_bundle_path_validator
35 | - enabled: 1
36 | symbol: project_resource_path_validator
37 | - enabled: 1
38 | symbol: project_skill_definition_validator
39 | - enabled: 1
40 | symbol: project_skill_validator
41 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Config/Resources/AssetValidatorOverrideConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 97af9a21397949044b741275236f28b8
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Contracts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 09a8b4e8322542f08b38475a57083d79
3 | timeCreated: 1539340329
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Contracts/AssetBundlePathContract.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Collections.Generic;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// An defines a set of assets by asset bundle path. These contracts
30 | /// will be found via reflection and validated in the editor to make sure that each string path returned
31 | /// from resolves to an asset in an asset bundle.
32 | ///
33 | public abstract class AssetBundlePathContract
34 | {
35 | ///
36 | /// Returns a dictionary where the keys are asset bundle names and the value is a list of paths to
37 | /// assets in that asset bundle.
38 | ///
39 | ///
40 | public abstract Dictionary> GetPaths();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Contracts/AssetBundlePathContract.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9cf87a59e328ae54ebd47a31a060fc68
3 | timeCreated: 1513107782
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Contracts/ResourcePathContract.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Collections.Generic;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// A defines a set of assets by resource path that should be available
30 | /// for loading using the static class. These contracts will be found
31 | /// via reflection and validated in the editor to make sure that each string path returned from
32 | /// resolves to an asset.
33 | ///
34 | public abstract class ResourcePathContract
35 | {
36 | ///
37 | /// Returns an of where each should resolve to an
38 | /// asset loaded by using
39 | ///
40 | ///
41 | public abstract IEnumerable GetPaths();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Contracts/ResourcePathContract.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 408a27ff149aee7489a9b646d9153ebf
3 | timeCreated: 1513101143
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b28f33050cef7cf4eb921196f93a96ad
3 | folderAsset: yes
4 | timeCreated: 1512054891
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display/LogGroupingMode.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Runtime.Serialization;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// Defines the mode by which log content should be grouped.
30 | ///
31 | internal enum LogGroupingMode
32 | {
33 | ///
34 | /// Logs are grouped by the validator associated with them.
35 | ///
36 | [EnumMember(Value = EditorConstants.GroupByValidator)]
37 | CollapseByValidatorType = 0,
38 |
39 | ///
40 | /// Logs are grouped by the area they are associated with.
41 | ///
42 | [EnumMember(Value = EditorConstants.GroupBySource)]
43 | CollapseByArea = 1
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display/LogGroupingMode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 43c1080d33ed1bf42a5f5ff853cfc4d3
3 | timeCreated: 1512058075
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display/ValidationLogTreeView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7cf5a733fab1f47458bbf58f1f2a8fef
3 | timeCreated: 1516897144
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display/ValidationLogTreeViewHeader.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEditor.IMGUI.Controls;
25 | using UnityEngine;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// represents a group of related
31 | /// entries and indicates the counts of informational, warning, and error logs present.
32 | ///
33 | internal sealed class ValidationLogTreeViewHeader : TreeViewItem
34 | {
35 | ///
36 | /// The number of errors grouped underneath this .
37 | ///
38 | public int ErrorCount { get; private set; }
39 |
40 | ///
41 | /// The number of warnings grouped underneath this .
42 | ///
43 | public int WarningCount { get; private set; }
44 |
45 | ///
46 | /// The number of info messages grouped underneath this .
47 | ///
48 | public int InfoCount { get; private set; }
49 |
50 | ///
51 | /// Empty-constructor to allow access to the base constructor equivalent.
52 | ///
53 | ///
54 | ///
55 | ///
56 | public ValidationLogTreeViewHeader(int id, int depth, string displayName)
57 | : base(id, depth, displayName)
58 | {
59 | }
60 |
61 | ///
62 | /// Sets the number of error, warning, and informational log entries visible on this header.
63 | ///
64 | ///
65 | ///
66 | ///
67 | public void SetLogCounts(int errors, int warnings, int infos)
68 | {
69 | ErrorCount = Mathf.Clamp(errors, 0, 999);
70 | WarningCount = Mathf.Clamp(warnings, 0, 999);
71 | InfoCount = Mathf.Clamp(infos, 0, 999);
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display/ValidationLogTreeViewHeader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5bfd673bdb6cb2c4db5e0dfa97ea0fb6
3 | timeCreated: 1516897144
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display/ValidationLogTreeViewItem.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEditor.IMGUI.Controls;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// representing a single
30 | ///
31 | internal sealed class ValidationLogTreeViewItem : TreeViewItem
32 | {
33 | ///
34 | /// The associated with this .
35 | ///
36 | public ValidationLog Log { get; }
37 |
38 | ///
39 | /// Constructor that accepts a and sets an empty display name.
40 | ///
41 | ///
42 | ///
43 | ///
44 | public ValidationLogTreeViewItem(ValidationLog log, int id, int depth)
45 | : base(id, depth, string.Empty)
46 | {
47 | Log = log;
48 | }
49 |
50 | ///
51 | /// Constructor that accepts a and a custom
52 | /// .
53 | ///
54 | ///
55 | ///
56 | ///
57 | ///
58 | public ValidationLogTreeViewItem(ValidationLog log, int id, int depth, string displayName)
59 | : base(id, depth, displayName)
60 | {
61 | Log = log;
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Display/ValidationLogTreeViewItem.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9b28f058b0f685141aa9352e21ba640f
3 | timeCreated: 1516897144
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/EditorConstants.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 301e7ca84e6547a6849dffd3941f24b1
3 | timeCreated: 1539368580
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Extensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 60f1280dc00841b1abf598926701781f
3 | timeCreated: 1539341192
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Extensions/FileOutputFormatExtensions.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | namespace JCMG.AssetValidator.Editor
25 | {
26 | ///
27 | /// Helper extensions for .
28 | ///
29 | internal static class FileOutputFormatExtensions
30 | {
31 | private const string HtmlExtension = ".html";
32 | private const string CsvExtension = ".csv";
33 | private const string TextExtension = ".txt";
34 |
35 | public static string GetOutputFormatExtension(this FileOutputFormat format)
36 | {
37 | switch (format)
38 | {
39 | case FileOutputFormat.Html:
40 | return HtmlExtension;
41 |
42 | case FileOutputFormat.Csv:
43 | return CsvExtension;
44 |
45 | case FileOutputFormat.Text:
46 | return TextExtension;
47 |
48 | case FileOutputFormat.None:
49 | default:
50 | return string.Empty;
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Extensions/FileOutputFormatExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6c71cd02c8564f96a24bc493d41ef2d8
3 | timeCreated: 1550325112
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Extensions/TransformExtensions.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// Extension methods for
30 | ///
31 | internal static class TransformExtensions
32 | {
33 | private const string GetPathFormat = "{0}/{1}";
34 |
35 | ///
36 | /// GetPath returns the object's absolute path in a scene.
37 | ///
38 | ///
39 | ///
40 | public static string GetPath(this Transform current)
41 | {
42 | return current.parent == null
43 | ? current.name
44 | : string.Format(GetPathFormat, current.parent.GetPath(), current.name);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Extensions/TransformExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d72d3591e4937084291ac278559ed27d
3 | timeCreated: 1510954437
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Inspector.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0b0688f96a7c4044b0183596e3975cf4
3 | timeCreated: 1539341013
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Inspector/AssetValidatorOverrideConfigInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3b3c7404033b30648aebafe412bd131c
3 | timeCreated: 1512492175
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/JCMG.AssetValidator.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "JCMG.AssetValidator.Editor",
3 | "references": [
4 | "JCMG.AssetValidator"
5 | ],
6 | "optionalUnityReferences": [],
7 | "includePlatforms": [
8 | "Editor"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": []
16 | }
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/JCMG.AssetValidator.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a4aae3cedecd6d43a8b38d9a6c83dee
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 61cdfb82ff517a14bbbb50cf3cc312f9
3 | folderAsset: yes
4 | timeCreated: 1510431369
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta/ClassTypeCache.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad8189d0a1af9a24d9a3b4abf6a535f8
3 | timeCreated: 1509840093
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta/CrossSceneValidatorCache.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Collections.Generic;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a cache of derived
30 | /// instance(s).
31 | ///
32 | internal class CrossSceneValidatorCache
33 | {
34 | private readonly List _validators;
35 |
36 | ///
37 | /// Constructor to create a pre-filled .
38 | ///
39 | public CrossSceneValidatorCache()
40 | {
41 | // Find all non-abstract derived instances of CrossSceneValidatorBase
42 | var validators = ReflectionTools.GetAllDerivedInstancesOfType();
43 | _validators = new List();
44 |
45 | // Make sure any overriden, disabled validator types are not included
46 | var overrideConfig = AssetValidatorOverrideConfig.FindOrCreate();
47 | foreach (var baseCrossSceneValidator in validators)
48 | {
49 | var t = baseCrossSceneValidator.GetType();
50 |
51 | AssetValidatorOverrideConfig.OverrideItem overrideItem;
52 | if (overrideConfig.TryGetOverrideConfigItem(t, out overrideItem) && overrideItem.enabled)
53 | {
54 | _validators.Add(baseCrossSceneValidator);
55 | }
56 | }
57 | }
58 |
59 | ///
60 | /// The total count of derived instance(s) in the cache.
61 | ///
62 | public int Count
63 | {
64 | get { return _validators.Count; }
65 | }
66 |
67 | ///
68 | /// Returns a derived instance at position
69 | /// in the cache.
70 | ///
71 | ///
72 | ///
73 | public CrossSceneValidatorBase this[int index]
74 | {
75 | get { return _validators[index]; }
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta/CrossSceneValidatorCache.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9e286d208fab67c46adbb8fa168ef8dd
3 | timeCreated: 1511822599
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta/InstanceValidatorCache.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3277075dfe3e1ec4c886909a9a018576
3 | timeCreated: 1509912424
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta/ProjectValidatorCache.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Collections.Generic;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a cache of derived instances.
30 | ///
31 | internal class ProjectValidatorCache
32 | {
33 | private readonly List _validators;
34 |
35 | ///
36 | /// Constructor to create a pre-filled .
37 | ///
38 | public ProjectValidatorCache()
39 | {
40 | _validators = new List();
41 |
42 | // Make sure any overriden disabled types are not included
43 | var overrideConfig = AssetValidatorOverrideConfig.FindOrCreate();
44 |
45 | // Get and add all field validators, excluding override disabled ones.
46 | var pvs = ReflectionTools.GetAllDerivedInstancesOfTypeWithAttribute();
47 | foreach (var projectValidator in pvs)
48 | {
49 | var t = projectValidator.GetType();
50 |
51 | AssetValidatorOverrideConfig.OverrideItem overrideItem;
52 | if (overrideConfig.TryGetOverrideConfigItem(t, out overrideItem) && overrideItem.enabled)
53 | {
54 | _validators.Add(projectValidator);
55 | }
56 | }
57 | }
58 |
59 | ///
60 | /// The total count of derived instances in the cache.
61 | ///
62 | public int Count
63 | {
64 | get { return _validators.Count; }
65 | }
66 |
67 | ///
68 | /// Returns the derived instance at position
69 | /// in the cache.
70 | ///
71 | ///
72 | ///
73 | public ProjectValidatorBase this[int index]
74 | {
75 | get { return _validators[index]; }
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta/ProjectValidatorCache.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 115407eb55fe76c4b95b99513cc9227f
3 | timeCreated: 1513091294
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Meta/SortedEnum.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8080ea795ff679d4ca5774de8328de8e
3 | timeCreated: 1511118428
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c8dbb51612c0024ab60188f586d83b0
3 | folderAsset: yes
4 | timeCreated: 1510431369
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/FileOutputFormat.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using System.Runtime.Serialization;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// indicates the mode in which validation logs will be written to a file.
31 | ///
32 | [Serializable]
33 | public enum FileOutputFormat
34 | {
35 | ///
36 | /// Logs will not be written to a file
37 | ///
38 | [EnumMember(Value = "No Output")]
39 | None = 0,
40 |
41 | ///
42 | /// Logs will be written to a HTML file.
43 | ///
44 | [EnumMember(Value = "Html")]
45 | Html = 1,
46 |
47 | ///
48 | /// Logs will be written to a CSV file.
49 | ///
50 | [EnumMember(Value = "Csv")]
51 | Csv = 2,
52 |
53 | ///
54 | /// Logs will be written to a plaintext file.
55 | ///
56 | [EnumMember(Value = "Text")]
57 | Text = 3
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/FileOutputFormat.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c1b15be9fef1c04ebe281a96cd6854a
3 | timeCreated: 1510942480
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/LogCache.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Collections;
25 | using System.Collections.Generic;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// represents a cache of logs from a validation session.
31 | ///
32 | internal sealed class LogCache : IReadOnlyList
33 | {
34 | private readonly IList _logs;
35 |
36 | public LogCache()
37 | {
38 | _logs = new List();
39 | }
40 |
41 | ///
42 | /// Adds a to the cache.
43 | ///
44 | ///
45 | internal void OnLogCreated(ValidationLog log)
46 | {
47 | _logs.Add(log);
48 | }
49 |
50 | ///
51 | /// Clears all (s) from the cache.
52 | ///
53 | internal void ClearLogs()
54 | {
55 | _logs.Clear();
56 | }
57 |
58 | ///
59 | /// Returns true if there are any s, otherwise false.
60 | ///
61 | ///
62 | internal bool HasLogs()
63 | {
64 | return _logs.Count > 0;
65 | }
66 |
67 | ///
68 | /// The total number of validation logs in the cache.
69 | ///
70 | public int Count => _logs.Count;
71 |
72 | ///
73 | /// Returns a present at position in the cache.
74 | ///
75 | ///
76 | ///
77 | public ValidationLog this[int index]
78 | {
79 | get { return _logs[index]; }
80 | }
81 |
82 | public IEnumerator GetEnumerator()
83 | {
84 | return _logs.GetEnumerator();
85 | }
86 |
87 | IEnumerator IEnumerable.GetEnumerator()
88 | {
89 | return GetEnumerator();
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/LogCache.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 46210a73955249542b2267e97e671aa3
3 | timeCreated: 1509979584
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/LogFileWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b8a9873f848c85e4d8bdb7593de4f6f4
3 | timeCreated: 1511188634
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/LogSource.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// indicates the general location of the
30 | /// instance, if any, the log is associated with.
31 | ///
32 | [Serializable]
33 | public enum LogSource
34 | {
35 | ///
36 | /// The log is not associated with a specific area in the Unity Editor.
37 | ///
38 | None,
39 |
40 | ///
41 | /// The log is associated with a specific scene.
42 | ///
43 | Scene,
44 |
45 | ///
46 | /// The log is associated with the Project's Assets folder in the Unity Editor.
47 | ///
48 | Project
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/LogSource.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9ee381ddd1cebd344b037cd9931e22af
3 | timeCreated: 1511981201
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/LogType.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | [Serializable]
29 | public enum LogType
30 | {
31 | Info = 0,
32 | Warning = 1,
33 | Error = 2
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/LogType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 76fccad7a82a2e34eb6bf5d42d7c6e76
3 | timeCreated: 1513607837
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Output/ValidationLog.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6fa9018be4b1199499b832f7c34591e3
3 | timeCreated: 1513607837
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e2d7bcd8de374dcb986f935234bae173
3 | timeCreated: 1539340993
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/JCMG.AssetValidator.Editor.Tests.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "JCMG.AssetValidator.Editor.Tests",
3 | "references": [
4 | "JCMG.AssetValidator",
5 | "JCMG.AssetValidator.Editor"
6 | ],
7 | "optionalUnityReferences": [
8 | "TestAssemblies"
9 | ],
10 | "includePlatforms": [
11 | "Editor"
12 | ],
13 | "excludePlatforms": [],
14 | "allowUnsafeCode": false
15 | }
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/JCMG.AssetValidator.Editor.Tests.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 84bce4205343e804e9d38031e750d555
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Meta.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aa4c32b3c6ab4c67915bb7a73c678bfe
3 | timeCreated: 1539341138
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Meta/ClassTypeCacheTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d1b6dcbc84414184abb68bda893046fd
3 | timeCreated: 1509843489
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Meta/ReflectionUtilityTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 87b3e8e9502671a4eb6a85c3cb079192
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Meta/SortedEnumTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Linq;
25 | using NUnit.Framework;
26 |
27 | namespace JCMG.AssetValidator.Editor.Tests
28 | {
29 | [TestFixture]
30 | public class SortedEnumTests
31 | {
32 | private enum SortedEnumTestType : byte
33 | {
34 | A = 0,
35 | B = 1,
36 | C = 2
37 | }
38 |
39 | private SortedEnum _se;
40 |
41 | [SetUp]
42 | public void SetUp()
43 | {
44 | _se = new SortedEnum();
45 | }
46 |
47 | [Test]
48 | public void AssertCanGetAllValuesGreaterThanA()
49 | {
50 | var items = _se.GetAllGreaterThan(SortedEnumTestType.A).ToList();
51 |
52 | Assert.IsTrue(items.Contains(SortedEnumTestType.B));
53 | Assert.IsTrue(items.Contains(SortedEnumTestType.C));
54 | }
55 |
56 | [Test]
57 | public void AssertCanGetAllValuesGreaterThanOrEqualToA()
58 | {
59 | var items = _se.GetAllGreaterThanOrEqualTo(SortedEnumTestType.A).ToList();
60 |
61 | Assert.IsTrue(items.Contains(SortedEnumTestType.A));
62 | Assert.IsTrue(items.Contains(SortedEnumTestType.B));
63 | Assert.IsTrue(items.Contains(SortedEnumTestType.C));
64 | }
65 |
66 | [Test]
67 | public void AssertCanGetAllValuesLessThanC()
68 | {
69 | var items = _se.GetAllLesserThan(SortedEnumTestType.C).ToList();
70 |
71 | Assert.IsTrue(items.Contains(SortedEnumTestType.A));
72 | Assert.IsTrue(items.Contains(SortedEnumTestType.B));
73 | }
74 |
75 | [Test]
76 | public void AssertCanGetAllValuesLessThanOrEqualToC()
77 | {
78 | var items = _se.GetAllLesserThanOrEqualTo(SortedEnumTestType.C).ToList();
79 |
80 | Assert.IsTrue(items.Contains(SortedEnumTestType.A));
81 | Assert.IsTrue(items.Contains(SortedEnumTestType.B));
82 | Assert.IsTrue(items.Contains(SortedEnumTestType.C));
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Meta/SortedEnumTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e102c0d6765c3104ca3da9d18e8b6cd6
3 | timeCreated: 1511118428
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Tools.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 87d59f3103b64aa0a9c64594930b6a71
3 | timeCreated: 1539341127
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Tools/ContinuousIntegrationToolsExamples.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using NUnit.Framework;
26 |
27 | namespace JCMG.AssetValidator.Editor.Tests
28 | {
29 | ///
30 | /// These are examples of how to run the ContinuousIntegrationTools either as a part of a Continuous Integration process
31 | /// or as part of Unit tests in the project.
32 | ///
33 | [TestFixture]
34 | public class ContinuousIntegrationToolsExamples
35 | {
36 | [Test]
37 | [Ignore("This is an example of how to run the AssetValidator only on Project Assets" +
38 | "as a Unit Test or CI process.")]
39 | public void RunAssetValidatorOnProjectAssetsOnly()
40 | {
41 | var result = ContinuousIntegrationTools.RunValidation(
42 | SceneValidationMode.None,
43 | FileOutputFormat.None,
44 | doValidateProjectAssets: true,
45 | doValidateAcrossScenes: true);
46 |
47 | Assert.True(result.isSuccessful, result.message);
48 | }
49 |
50 | [Test]
51 | [Ignore(
52 | "This is an example of how to run the AssetValidator on Project Assets and on Build and AssetBundle Scenes" +
53 | "and write out the results to a datetime formatted html log as a Unit Test or CI process.")]
54 | public void RunAssetValidatorOnProjectAssets_BuildAndAssetBundleScenes()
55 | {
56 | const string fileLogFormat = "asset_validator_results_{0:h_mm_ss_MM_dd_yyyy}";
57 | var result = ContinuousIntegrationTools.RunValidation(
58 | SceneValidationMode.AllBuildAndAssetBundleScenes,
59 | FileOutputFormat.Html,
60 | doValidateProjectAssets: true,
61 | doValidateAcrossScenes: false,
62 | fileName: string.Format(fileLogFormat, DateTime.Now));
63 |
64 | Assert.True(result.isSuccessful, result.message);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Tools/ContinuousIntegrationToolsExamples.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 36220f5f9b14a1542bd625d167ac3261
3 | timeCreated: 1513609030
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f2200d519ab0ca442940c7bb9eac0df6
3 | folderAsset: yes
4 | timeCreated: 1510431369
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8ad2c92330464eba89233f2e5ce864db
3 | timeCreated: 1539347187
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/FieldValidatorTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Linq;
25 | using NUnit.Framework;
26 | using UnityEngine;
27 |
28 | namespace JCMG.AssetValidator.Editor.Tests
29 | {
30 | [TestFixture]
31 | public class FieldValidatorTests
32 | {
33 | private FieldTestValidator _validator;
34 | private FieldTestObjectA _objectA;
35 | private FieldTestObjectB _objectB;
36 |
37 | private GameObject _gameObject;
38 |
39 | [SetUp]
40 | public void Setup()
41 | {
42 | _gameObject = new GameObject();
43 |
44 | _validator = new FieldTestValidator();
45 | _objectA = _gameObject.AddComponent();
46 | _objectB = _gameObject.AddComponent();
47 | }
48 |
49 | [TearDown]
50 | public void TearDown()
51 | {
52 | Object.DestroyImmediate(_gameObject);
53 | }
54 |
55 | [Test]
56 | public void AssertThatFieldValidatorAppliesToInstance()
57 | {
58 | var fields = _validator.GetFieldInfosApplyTo(_objectA);
59 |
60 | Assert.AreEqual(1, fields.Count());
61 | Assert.True(_validator.AppliesTo(_objectA));
62 | }
63 |
64 | [Test]
65 | public void AssertThatFieldValidatorDoesNotApplyToInstance()
66 | {
67 | var fields = _validator.GetFieldInfosApplyTo(_objectB);
68 |
69 | Assert.AreEqual(0, fields.Count());
70 | Assert.False(_validator.AppliesTo(_objectB));
71 | }
72 |
73 | #pragma warning disable 0649
74 |
75 | private class FieldTestAttribute : AssetValidator.FieldAttribute
76 | {
77 | }
78 |
79 | [OnlyIncludeInTests]
80 | [FieldValidator("field_test_validator", typeof(FieldTestAttribute))]
81 | private class FieldTestValidator : FieldValidatorBase
82 | {
83 | public override bool Validate(Object obj)
84 | {
85 | return false;
86 | }
87 | }
88 |
89 | [Validate]
90 | private class FieldTestObjectA : MonoBehaviourTwo
91 | {
92 | [FieldTest]
93 | public object obj;
94 | }
95 |
96 | [Validate]
97 | private class FieldTestObjectB : MonoBehaviourTwo
98 | {
99 | public object obj;
100 | }
101 |
102 | #pragma warning restore 0649
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/FieldValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9f19240a076d7294297be0ed4f6d49e6
3 | timeCreated: 1509904624
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/IsProjectReferenceValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c1db94b69643f413bb865f6baf0ea8a2
3 | timeCreated: 1512841421
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/IsSceneReferenceValidatorTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using NUnit.Framework;
25 | using UnityEngine;
26 |
27 | namespace JCMG.AssetValidator.Editor.Tests
28 | {
29 | [TestFixture]
30 | internal class IsSceneReferenceValidatorTests
31 | {
32 | private IsSceneReferenceFieldValidator _sFieldValidator;
33 | private GameObject _gameObject;
34 | private SceneRefObjectA _projectRefObjectA;
35 | private const string UNIT_TEST_RESOURCE_PATH = "ProjectPrefabSearchTest";
36 |
37 | [SetUp]
38 | public void Setup()
39 | {
40 | _sFieldValidator = new IsSceneReferenceFieldValidator();
41 | _gameObject = new GameObject();
42 | _projectRefObjectA = _gameObject.AddComponent();
43 | }
44 |
45 | [TearDown]
46 | public void TearDown()
47 | {
48 | Object.DestroyImmediate(_gameObject);
49 | }
50 |
51 | [Test]
52 | public void AssertThatValidatorReturnsFalseForNullReference()
53 | {
54 | Assert.False(_sFieldValidator.Validate(_projectRefObjectA));
55 | }
56 |
57 | [Test]
58 | public void AssertThatValidatorReturnsTrueForSceneReference()
59 | {
60 | var gameObjectSceneRef = new GameObject();
61 | _projectRefObjectA.projectRefField = gameObjectSceneRef;
62 |
63 | Assert.True(_sFieldValidator.Validate(_projectRefObjectA));
64 | }
65 |
66 | [Test]
67 | public void AssertThatValidatorReturnsFalseForProjectReference()
68 | {
69 | var projectRef = Resources.Load(UNIT_TEST_RESOURCE_PATH);
70 | _projectRefObjectA.projectRefField = projectRef;
71 |
72 | Assert.False(_sFieldValidator.Validate(_projectRefObjectA));
73 | }
74 |
75 | private class SceneRefObjectA : MonoBehaviour
76 | {
77 | [IsSceneReference]
78 | public Object projectRefField;
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/IsSceneReferenceValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 13e7f949d0f8a4fb68d7067550cb1005
3 | timeCreated: 1512847176
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/NonNullValidatorTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using NUnit.Framework;
25 | using UnityEngine;
26 |
27 | namespace JCMG.AssetValidator.Editor.Tests
28 | {
29 | [TestFixture]
30 | internal class NonNullValidatorTests
31 | {
32 | private NonNullFieldValidator _fieldValidator;
33 | private NonNullFieldTestObjectA _objectA;
34 | private NonNullFieldTestObjectB _objectB;
35 | private GameObject _gameObject;
36 |
37 | [SetUp]
38 | public void Setup()
39 | {
40 | _fieldValidator = new NonNullFieldValidator();
41 |
42 | _gameObject = new GameObject();
43 | _objectA = _gameObject.AddComponent();
44 | _objectB = _gameObject.AddComponent();
45 | }
46 |
47 | [TearDown]
48 | public void Cleanup()
49 | {
50 | Object.DestroyImmediate(_gameObject);
51 | }
52 |
53 | [Test]
54 | public void AssertThatFieldValidatorValidatesFalseOnNonNullRef()
55 | {
56 | Assert.False(_fieldValidator.Validate(_objectA));
57 | }
58 |
59 | [Test]
60 | public void AssertThatFieldValidatorValidatesTrueOnNonNullRef()
61 | {
62 | Assert.True(_fieldValidator.Validate(_objectB));
63 | }
64 |
65 | #pragma warning disable 0649
66 |
67 | [OnlyIncludeInTests]
68 | [Validate]
69 | private class NonNullFieldTestObjectA : MonoBehaviour
70 | {
71 | [NonNull]
72 | public object obj;
73 | }
74 |
75 | [OnlyIncludeInTests]
76 | [Validate]
77 | private class NonNullFieldTestObjectB : MonoBehaviour
78 | {
79 | public object obj;
80 | }
81 |
82 | #pragma warning restore 0649
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/NonNullValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0a57ffb631381704f93c2cde9666be68
3 | timeCreated: 1509904624
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/FieldValidators/ResourcePathValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7033f6d64a931474b81837c16fb5992b
3 | timeCreated: 1512578830
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ObjectValidators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ea73f921e08ee744491987d4b8632971
3 | folderAsset: yes
4 | timeCreated: 1511732332
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ObjectValidators/ObjectValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 41fff400cde156a4bafec02f5ebfae9a
3 | timeCreated: 1511793359
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ObjectValidators/RequireComponentValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d61d9a60a3f5ae4c88aa2ac1c7de774
3 | timeCreated: 1511962487
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ObjectValidators/ZeroChildrenValidatorTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using NUnit.Framework;
25 | using UnityEngine;
26 |
27 | namespace JCMG.AssetValidator.Editor.Tests
28 | {
29 | [TestFixture]
30 | public class ZeroChildrenValidatorTests
31 | {
32 | private ZeroChildrenObjectValidator _vzValidator;
33 | private GameObject _gameObject;
34 | private VTestObjectA _vTestObjectA;
35 |
36 | [SetUp]
37 | public void Setup()
38 | {
39 | _gameObject = new GameObject();
40 | _vTestObjectA = _gameObject.AddComponent();
41 |
42 | _vzValidator = new ZeroChildrenObjectValidator();
43 | }
44 |
45 | [TearDown]
46 | public void TearDown()
47 | {
48 | Object.DestroyImmediate(_gameObject);
49 | }
50 |
51 | [Test]
52 | public void AssertThatVZeroChildrenValidatesAsTrueForZeroChildren()
53 | {
54 | Assert.True(_vzValidator.Validate(_vTestObjectA));
55 | }
56 |
57 | [Test]
58 | public void AssertThatVZeroChildrenValidatesAsFalseForOneOrMoreChildren()
59 | {
60 | var childObject = new GameObject();
61 | childObject.transform.SetParent(_gameObject.transform);
62 |
63 | Assert.False(_vzValidator.Validate(_vTestObjectA));
64 | }
65 |
66 | [OnlyIncludeInTests]
67 | [ZeroChildren]
68 | public class VTestObjectA : MonoBehaviour
69 | {
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ObjectValidators/ZeroChildrenValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d8e01b9c86718f846bf778beac43f5ab
3 | timeCreated: 1511808165
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ProjectValidatorTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using NUnit.Framework;
25 |
26 | namespace JCMG.AssetValidator.Editor.Tests
27 | {
28 | [TestFixture]
29 | internal class ProjectValidatorTests
30 | {
31 | private ProjectAssetValidatorManager _pValidatorManager;
32 | private ClassTypeCache _coreCache;
33 | private LogCache _logCache;
34 |
35 | [SetUp]
36 | public void Setup()
37 | {
38 | _coreCache = new ClassTypeCache();
39 | _coreCache.AddTypeWithAttribute();
40 | _logCache = new LogCache();
41 |
42 | _pValidatorManager = new ProjectAssetValidatorManager(_coreCache, _logCache);
43 | }
44 |
45 | [Test]
46 | public void AssertThatProjectValidatorSearchCanFindProjectAsset()
47 | {
48 | Assert.AreEqual(0, _pValidatorManager.GetObjectsToValidate().Count);
49 |
50 | _pValidatorManager.Search();
51 |
52 | Assert.AreEqual(1, _pValidatorManager.GetObjectsToValidate().Count);
53 | }
54 |
55 | [Test]
56 | public void AssertThatProjectValidatorCanFindAndIdentifyIssuesWithProjectAssetsAllAtOnce()
57 | {
58 | _pValidatorManager.Search();
59 | _pValidatorManager.ValidateAll();
60 |
61 | Assert.AreEqual(1, _logCache.Count);
62 | Assert.AreEqual(LogType.Error, _logCache[0].logType);
63 | }
64 |
65 | [Test]
66 | public void AssertThatProjectValidatorCanFindAndIdentifyIssuesWithProjectAssetsContinuously()
67 | {
68 | _pValidatorManager.Search();
69 |
70 | while (_pValidatorManager.ContinueValidation())
71 | {
72 | // Do Nothing
73 | }
74 |
75 | Assert.AreEqual(1, _logCache.Count);
76 | Assert.AreEqual(LogType.Error, _logCache[0].logType);
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ProjectValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e3cd5297a32a910408dbf633078cbd65
3 | timeCreated: 1511378685
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ProjectValidators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1da9a864492c11748bea70de4e028ece
3 | folderAsset: yes
4 | timeCreated: 1513101143
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ProjectValidators/AssetBundlePathProjectValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3a491dba2584a3f4f81880185c7f48d1
3 | timeCreated: 1513107782
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ProjectValidators/ResourceContractProjectValidatorTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Collections.Generic;
25 | using System.Linq;
26 | using System.Reflection;
27 | using NUnit.Framework;
28 |
29 | namespace JCMG.AssetValidator.Editor.Tests
30 | {
31 | [TestFixture]
32 | public class ResourceContractProjectValidatorTests
33 | {
34 | private ResourceContractProjectValidator _cValidator;
35 |
36 | [SetUp]
37 | public void SetUp()
38 | {
39 | _cValidator = new ResourceContractProjectValidator(useTestContracts: true);
40 | }
41 |
42 | [Test]
43 | [Ignore(
44 | "In order to include the unit tests, but not have unnecessary Resources assets included with this project I have " +
45 | "set this test to be ignored and renamed the Resources folder it was using for the unit test to 'Resource_Unit_Test'." +
46 | "In order to run this unit test, comment out this ignore attribute and rename that folder to Resources.")]
47 | public void AssertThatUnitTestGuaranteeIsFoundAndCanBeValidated()
48 | {
49 | _cValidator.Search();
50 |
51 | var flags = BindingFlags.Instance | BindingFlags.NonPublic;
52 | var prop = typeof(ResourceContractProjectValidator).GetProperty("ResourcePaths", flags);
53 |
54 | Assert.IsNotNull(prop);
55 |
56 | var list = prop.GetValue(_cValidator, null) as List;
57 |
58 | Assert.IsNotNull(list);
59 |
60 | list = list.Where(x => x == UnitTestResourcePathContract.UNIT_TEST_RESOURCE_PATH).ToList();
61 | prop.SetValue(_cValidator, list, null);
62 |
63 | Assert.True(_cValidator.GetNumberOfResults() == 1, "");
64 | Assert.True(_cValidator.Validate());
65 | }
66 |
67 | [OnlyIncludeInTests]
68 | public sealed class UnitTestResourcePathContract : ResourcePathContract
69 | {
70 | public const string UNIT_TEST_RESOURCE_PATH = "ProjectPrefabSearchTest";
71 |
72 | public override IEnumerable GetPaths()
73 | {
74 | return new[] {UNIT_TEST_RESOURCE_PATH};
75 | }
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/ProjectValidators/ResourceContractProjectValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3d4bfeacd79df8b48b081e0ff733c282
3 | timeCreated: 1513101143
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tests/Validators/SceneValidatorTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 70db68851976e7e4b870bd3b12dbf61d
3 | timeCreated: 1509904624
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd10ad2c69e52284c97a1e49178e9a0f
3 | folderAsset: yes
4 | timeCreated: 1509912424
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/CommandLineTools.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using System.Collections.Generic;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// Helper methods for working with command line processes
31 | ///
32 | public static class CommandLineTools
33 | {
34 | ///
35 | /// Returns a series of command line arguments indexed into a dictionary.
36 | ///
37 | ///
38 | ///
39 | public static Dictionary GetNamedCommandlineArguments(char delimiter)
40 | {
41 | var dict = new Dictionary();
42 | var args = Environment.GetCommandLineArgs();
43 | for (var i = 0; i < args.Length; i++)
44 | {
45 | var splitArg = args[i].Split(delimiter);
46 |
47 | if (splitArg.Length <= 1)
48 | {
49 | continue;
50 | }
51 |
52 | dict.Add(splitArg[0], splitArg[1]);
53 | }
54 |
55 | return dict;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/CommandLineTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d3c2f86a81bde244ab2bbb370fcd8990
3 | timeCreated: 1510942480
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/ContinuousIntegrationTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b092b23aafba35e48acdf7268c459909
3 | timeCreated: 1510939733
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/FileTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 20a7e9690a8d60a4f89606d1d53c0396
3 | timeCreated: 1510943197
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/GraphicsTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1d62253ca96f83046abe927d721d7abe
3 | timeCreated: 1509979584
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/ObjectTools.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEditor;
25 | using UnityEngine;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// Helper methods for dealing with instances.
31 | ///
32 | public static class ObjectTools
33 | {
34 | public static string GetObjectPath(Object obj)
35 | {
36 | // if this is an asset in the project, return the relative asset path.
37 | if (AssetDatabase.GetAssetPath(obj) != string.Empty)
38 | {
39 | return AssetDatabase.GetAssetPath(obj);
40 | }
41 |
42 | // Otherwise if this is a Component or GameObject in a scene, return
43 | // the hierarchical scene path.
44 | var objComponent = (obj as Component);
45 | if (objComponent != null)
46 | {
47 | return objComponent.transform.GetPath();
48 | }
49 |
50 | var objGameObject = obj as GameObject;
51 | if (objGameObject != null)
52 | {
53 | return objGameObject.transform.GetPath();
54 | }
55 |
56 | // Otherwise return an empty string.
57 | return string.Empty;
58 | }
59 |
60 | ///
61 | /// Returns true if the is in the Unity Assets folder,
62 | /// otherwise returns false.
63 | ///
64 | ///
65 | ///
66 | public static bool IsProjectReference(Object obj)
67 | {
68 | var assetPath = AssetDatabase.GetAssetPath(obj);
69 | return !string.IsNullOrEmpty(assetPath);
70 | }
71 |
72 | ///
73 | /// Returns true if the is in a Scene, otherwise
74 | /// returns false.
75 | ///
76 | ///
77 | ///
78 | public static bool IsSceneReference(Object obj)
79 | {
80 | return !IsProjectReference(obj);
81 | }
82 |
83 | ///
84 | /// Returns true if the is null, otherwise returns false.
85 | ///
86 | ///
87 | ///
88 | public static bool IsNullReference(Object obj)
89 | {
90 | return obj == null ||
91 | obj.ToString() == EditorConstants.NullGameObject;
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/ObjectTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c2d087ac55d54037b41670392c5bb3e
3 | timeCreated: 1512842764
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/ProjectTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fabe31a077eabe24686fb2d87d4fa552
3 | timeCreated: 1510526687
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/ReflectionTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eef3313007151744dbf622325f87397e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Tools/ValidationLogTreeViewTools.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 390a4e8d05074b140b93272f3a385819
3 | timeCreated: 1512058075
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3fbcbfb7d4b4cfe49b4ae1b1fc8188a4
3 | folderAsset: yes
4 | timeCreated: 1510431369
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/AbstractInstanceValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d70eb41e4addac419d7ca912f68e77c
3 | timeCreated: 1511741292
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/AssetValidatorRunner.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f25b9f0de6598b45b9186be732b8c2a
3 | timeCreated: 1511107293
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7d9aae48176ce27498485edfba7304fd
3 | folderAsset: yes
4 | timeCreated: 1511822598
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators/CrossSceneValidatorBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 67d69c043c408b842a0413dc597640a9
3 | timeCreated: 1511822598
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators/EnsureComponentIsUniqueValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d0cf4996c015b23459dc12d40c4ed51c
3 | timeCreated: 1511903281
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators/MissingReferenceValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d1d8be52a8fc845429595a3dc9838bfe
3 | timeCreated: 1513438469
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators/MultipleEventSystemsValidator.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine.EventSystems;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a a cross-scene validator that helps validate whether or
30 | /// not there is a single EventSystem instance present in one or more scene(s).
31 | ///
32 | [Validator("cross_scene_multiple_event_systems")]
33 | [ValidatorDescription("Checks one or more Scenes to ensure that there is only one EventSystem.")]
34 | public sealed class MultipleEventSystemsValidator : EnsureComponentIsUniqueValidator
35 | {
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators/MultipleEventSystemsValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a7afdc86ec112e46a4a6a44f7e3e1a1
3 | timeCreated: 1511822598
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators/MultipleMainCamerasValidator.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a cross-scene validator that validates that there is only
30 | /// one component instance tagged as the "MainCamera".
31 | ///
32 | [Validator("cross_scene_multiple_cameras")]
33 | [ValidatorDescription(
34 | "Checks one or more Scenes to ensure that there is only one Camera tagged as the MainCamera.")]
35 | public sealed class MultipleMainCamerasValidator : EnsureComponentIsUniqueValidator
36 | {
37 | private const string MAIN_CAMERA_TAG = "MainCamera";
38 |
39 | public override bool ShouldAddComponent(Camera obj)
40 | {
41 | return obj.CompareTag(MAIN_CAMERA_TAG);
42 | }
43 |
44 | public override string TargetTypeName
45 | {
46 | get { return "Camera Tagged as \"MainCamera\""; }
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/CrossSceneValidators/MultipleMainCamerasValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 724b4778d27bdad4a89dc18aab85fb6e
3 | timeCreated: 1511903991
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Documentation.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 21fc0198b7f747acb745eaf7ce1dd2e9
3 | timeCreated: 1550331973
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Documentation/ValidatorDescriptionAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a meant to help describe a
30 | /// validator in human-readable terms for external documentation tool usage.
31 | ///
32 | [AttributeUsage(AttributeTargets.Class, Inherited = false)]
33 | public sealed class ValidatorDescriptionAttribute : Attribute
34 | {
35 | ///
36 | /// A human-readable description of the decorated validator.
37 | ///
38 | public string Description { get; }
39 |
40 | public ValidatorDescriptionAttribute(string description)
41 | {
42 | Description = description;
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Documentation/ValidatorDescriptionAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec595b95d2bf89247aff286ad781de65
3 | timeCreated: 1513778199
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Documentation/ValidatorExampleAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a meant to help describe a code example
30 | /// about a specific validator for external documentation tool usage.
31 | ///
32 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
33 | public sealed class ValidatorExampleAttribute : Attribute
34 | {
35 | ///
36 | /// The example content for how a validator is used.
37 | ///
38 | public string ExampleContent { get; }
39 |
40 | public ValidatorExampleAttribute(string example)
41 | {
42 | ExampleContent = example;
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Documentation/ValidatorExampleAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d20eac11dff756f4996d44db1e1dd47d
3 | timeCreated: 1513880081
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c77230b35e78a4f46864d0ad172c4c3a
3 | folderAsset: yes
4 | timeCreated: 1509897134
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/FieldValidatorAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using UnityEngine.Assertions;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// is used by derived classes of to
31 | /// determine whether or not it can validate a particular instance type.
32 | ///
33 | [AttributeUsage(AttributeTargets.Class)]
34 | public class FieldValidatorAttribute : ValidatorAttribute
35 | {
36 | ///
37 | /// The target -derived type that a validator will track.
38 | ///
39 | public Type TargetType { get; }
40 |
41 | private const string InvalidTargetTypeWarning =
42 | "FieldValidatorAttribute must target an attribute deriving from FieldValidatorAttribute";
43 |
44 | public FieldValidatorAttribute(string symbol, Type targetType) : base(symbol)
45 | {
46 | Assert.IsTrue(targetType.IsSubclassOf(typeof(FieldAttribute)), InvalidTargetTypeWarning);
47 |
48 | TargetType = targetType;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/FieldValidatorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a5fa2db2dfe49c44a4703f077792dbe
3 | timeCreated: 1509897135
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/FieldValidatorBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 034a4ea200bf01b4389dac1de0ba3f85
3 | timeCreated: 1509897135
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/IsProjectReferenceFieldValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3abcd33998a5e4a36a12fcd39b15f232
3 | timeCreated: 1512841421
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/IsSceneReferenceFieldValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 03917f1ba54db4255ae728fc2cffe937
3 | timeCreated: 1512847176
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/NonNullFieldValidator.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a validator meant to help ensure fields decorated with
30 | /// have values assigned.
31 | ///
32 | [FieldValidator("field_non_null_validator", typeof(NonNullAttribute))]
33 | [ValidatorDescription(
34 | "Uses the ```[NonNull]``` field attribute to ensure that the assigned reference is not null.")]
35 | [ValidatorExample(@"
36 | ///
37 | /// NonNullFieldComponent is a MonoBehavior derived class that has been marked as a [Validate]
38 | /// target. Any fields of [NonNull] on it will be checked to see if it has a null value. If the
39 | /// value of the field checked is null, a validation error will be dispatched.
40 | ///
41 | [Validate]
42 | public class NonNullFieldComponent : MonoBehaviour
43 | {
44 | [NonNull]
45 | public GameObject nullFieldExample;
46 | }
47 | ")]
48 | public sealed class NonNullFieldValidator : FieldValidatorBase
49 | {
50 | private const string NullWarningFormat = "[{0}] has a null assignment for field [{1}]";
51 |
52 | public override bool Validate(Object obj)
53 | {
54 | var isValidated = true;
55 | var fields = GetFieldInfosApplyTo(obj);
56 | foreach (var field in fields)
57 | {
58 | var objValue = field.GetValue(obj);
59 |
60 | // If the field's type is a UnityEngine.Object derived type, cast it as such and check to see
61 | // if it is null. If not, continue.
62 | if (field.FieldType.IsSubclassOf(typeof(Object)))
63 | {
64 | var unityObjValue = objValue as Object;
65 | if (!ObjectTools.IsNullReference(unityObjValue))
66 | {
67 | continue;
68 | }
69 | }
70 | // Otherwise if it is not a UnityEngine.Object type, simple check for null and continue
71 | // if it has a value.
72 | else if(objValue != null)
73 | {
74 | continue;
75 | }
76 |
77 | DispatchLogEvent(
78 | obj,
79 | LogType.Error,
80 | string.Format(NullWarningFormat, obj.name, field.Name));
81 |
82 | isValidated = false;
83 | }
84 |
85 | return isValidated;
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/NonNullFieldValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4a5de36a2f70cdd46b890a17d16dd90a
3 | timeCreated: 1509897135
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/FieldValidators/ResourcePathFieldValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6dc7afbd003a0454ca0f79b066078e89
3 | timeCreated: 1512578830
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0ef039b922794ab982caca9e32a09629
3 | timeCreated: 1539360752
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers/ActiveSceneValidatorManager.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 | using UnityEngine.SceneManagement;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// inspects components in a single scene whose type
31 | /// is contained in the passed instance and outputs any logs for validation to
32 | /// the passed instance.
33 | ///
34 | internal sealed class ActiveSceneValidatorManager : InstanceValidatorManagerBase
35 | {
36 | public ActiveSceneValidatorManager(ClassTypeCache cache, LogCache logCache)
37 | : base(cache, logCache)
38 | {
39 | }
40 |
41 | public override void Search()
42 | {
43 | _objectsToValidate.Clear();
44 | for (var i = 0; i < _cache.Count; i++)
45 | {
46 | _objectsToValidate.AddRange(Object.FindObjectsOfType(_cache[i]));
47 | }
48 | }
49 |
50 | protected override void OnLogCreated(ValidationLog validationLog)
51 | {
52 | validationLog.scenePath = SceneManager.GetActiveScene().path;
53 | validationLog.source = LogSource.Scene;
54 |
55 | base.OnLogCreated(validationLog);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers/ActiveSceneValidatorManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3dc0e5a7d615f4a48a0891a51fb42991
3 | timeCreated: 1510431369
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers/CrossSceneValidatorManager.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a validator manager that validates one or more scenes
30 | /// using all derived validators of with a decorated
31 | /// .
32 | ///
33 | internal sealed class CrossSceneValidatorManager : ValidatorManagerBase
34 | {
35 | private readonly CrossSceneValidatorCache _crossSceneValidatorCache;
36 |
37 | public CrossSceneValidatorManager(LogCache logCache)
38 | : base(logCache)
39 | {
40 | _crossSceneValidatorCache = new CrossSceneValidatorCache();
41 |
42 | for (var i = 0; i < _crossSceneValidatorCache.Count; i++)
43 | {
44 | _crossSceneValidatorCache[i].LogCreated += logCache.OnLogCreated;
45 | }
46 | }
47 |
48 | public override bool IsComplete()
49 | {
50 | return _continuousProgress >= _crossSceneValidatorCache.Count;
51 | }
52 |
53 | public override float GetProgress()
54 | {
55 | return Mathf.Clamp01(_continuousProgress / (float)_crossSceneValidatorCache.Count);
56 | }
57 |
58 | public override void Search()
59 | {
60 | for (var i = 0; i < _crossSceneValidatorCache.Count; i++)
61 | {
62 | _crossSceneValidatorCache[i].Search();
63 | }
64 | }
65 |
66 | public override void ValidateAll()
67 | {
68 | for (; _continuousProgress < _crossSceneValidatorCache.Count; _continuousProgress++)
69 | {
70 | _crossSceneValidatorCache[_continuousProgress].Validate();
71 | }
72 | }
73 |
74 | public override bool ContinueValidation()
75 | {
76 | if (_continuousProgress >= _crossSceneValidatorCache.Count)
77 | {
78 | return false;
79 | }
80 |
81 | var nextStep = _continuousProgress + _continuousObjectsPerStep >= _crossSceneValidatorCache.Count
82 | ? _crossSceneValidatorCache.Count
83 | : _continuousProgress + _continuousObjectsPerStep;
84 |
85 | for (; _continuousProgress < nextStep; _continuousProgress++)
86 | {
87 | _crossSceneValidatorCache[_continuousProgress].Validate();
88 | }
89 |
90 | return _continuousProgress < _crossSceneValidatorCache.Count;
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers/CrossSceneValidatorManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b374015a3f5c32f4096275ffc5ecdc9d
3 | timeCreated: 1511822599
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers/InstanceValidatorManagerBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d6a50e312e1e6ae4eb532ff7c243ce6c
3 | timeCreated: 1511822599
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers/ProjectAssetValidatorManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6a338e7a7d1578642bb8312ce7b6faf1
3 | timeCreated: 1511378603
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/Managers/ValidatorManagerBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9acb1494f26760544a57cee511c44b23
3 | timeCreated: 1510431369
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 640cdf3be157c0a4d9a78d173a08fb9e
3 | folderAsset: yes
4 | timeCreated: 1511732332
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators/HasComponentObjectValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 51a0158801e793b46b844323f518d822
3 | timeCreated: 1511962487
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators/ObjectValidatorAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using UnityEngine.Assertions;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | ///
30 | /// is a decorator meant for usage on
31 | /// derived implementations to uniquely identify them and a derived target
32 | /// type that it will validate.
33 | ///
34 | [AttributeUsage(AttributeTargets.Class)]
35 | public sealed class ObjectValidatorAttribute : ValidatorAttribute
36 | {
37 | ///
38 | /// The target -derived type that a validator will track.
39 | ///
40 | public Type TargetType { get; }
41 |
42 | ///
43 | /// The instance of .
44 | ///
45 | public ValidateAttribute TargetAttribute { get; }
46 |
47 | private const string MissingValidateAttributeWarning =
48 | "ObjectValidatorAttribute must target an attribute deriving from ValidateAttribute.";
49 |
50 | public ObjectValidatorAttribute(string symbol, Type targetType) : base(symbol)
51 | {
52 | Assert.IsTrue(targetType.IsSubclassOf(typeof(ValidateAttribute)), MissingValidateAttributeWarning);
53 |
54 | TargetType = targetType;
55 | TargetAttribute = (ValidateAttribute)Activator.CreateInstance(TargetType);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators/ObjectValidatorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 982b632c268b1eb40bf71ad693d74066
3 | timeCreated: 1511732332
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators/ObjectValidatorBase.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using UnityEngine;
26 | using UnityEngine.Assertions;
27 | using Object = UnityEngine.Object;
28 |
29 | namespace JCMG.AssetValidator.Editor
30 | {
31 | ///
32 | /// is a abstract validator class intended for validating an object
33 | /// instance deriving from either or .
34 | ///
35 | public abstract class ObjectValidatorBase : AbstractInstanceValidator
36 | {
37 | private readonly UnityTargetType _targetTypeType;
38 |
39 | private const string HasObjectValidatorWarning =
40 | "Subclasses of ObjectValidatorBase are required to be decorated with a ObjectValidatorAttribute to " +
41 | "determine what type they are validating";
42 |
43 | protected ObjectValidatorBase()
44 | {
45 | var vObjectTargets = (ObjectValidatorAttribute[])GetType().GetCustomAttributes(typeof(ObjectValidatorAttribute), true);
46 | Assert.IsFalse(vObjectTargets.Length == 0, HasObjectValidatorWarning);
47 |
48 | _typeToTrack = vObjectTargets[0].TargetType;
49 | _targetTypeType = vObjectTargets[0].TargetAttribute.UnityTargetType;
50 | }
51 |
52 | public sealed override bool AppliesTo(Object obj)
53 | {
54 | return AppliesTo(obj.GetType());
55 | }
56 |
57 | public sealed override bool AppliesTo(Type type)
58 | {
59 | return HasRelevantAttribute(type) && DerivesFromCorrectTargetType(type);
60 | }
61 |
62 | private bool HasRelevantAttribute(Type type)
63 | {
64 | var attr = type.GetCustomAttributes(_typeToTrack, true);
65 | return attr.Length > 0;
66 | }
67 |
68 | private bool DerivesFromCorrectTargetType(Type type)
69 | {
70 | switch (_targetTypeType)
71 | {
72 | case UnityTargetType.MonoBehavior:
73 | return type.IsSubclassOf(typeof(MonoBehaviour));
74 |
75 | case UnityTargetType.ScriptableObject:
76 | return type.IsSubclassOf(typeof(ScriptableObject));
77 | default:
78 | throw new NotImplementedException(Enum.GetName(typeof(UnityTargetType), _targetTypeType));
79 | }
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators/ObjectValidatorBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c3423805afc4b5f4aa404684588f691e
3 | timeCreated: 1511732332
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators/ZeroChildrenObjectValidator.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | [ObjectValidator("object_zero_children_validator", typeof(ZeroChildrenAttribute))]
29 | [ValidatorDescription(
30 | "Uses the ```[ZeroChildren]``` class attribute to ensure that the GameObject has zero children.")]
31 | [ValidatorExample(@"
32 | ///
33 | /// ZeroChildrenComponent is a MonoBehavior derived class that has been marked as a [Validate]
34 | /// target due to [ZeroChildren] (a subclass attribute of [Validate]). All instances of ZeroChildrenComponent
35 | /// will be found in any scenes searched and in the project on prefabs if searched. If any child GameObjects
36 | /// are found on the ZeroChildrenComponent instance, a validation error will be dispatched.
37 | ///
38 | [ZeroChildren]
39 | public class ZeroChildrenComponent : MonoBehaviour
40 | {
41 |
42 | }
43 | ")]
44 | public sealed class ZeroChildrenObjectValidator : ObjectValidatorBase
45 | {
46 | private const string InvalidTypeWarning = "[{0}] could not be cast to a MonoBehaviour.";
47 | private const string ChildObjectsPresentWarning = "[{0}] has one or more children when it should have zero.";
48 |
49 | public override bool Validate(Object obj)
50 | {
51 | var monoBehaviour = obj as MonoBehaviour;
52 | if (monoBehaviour == null)
53 | {
54 | DispatchLogEvent(obj, LogType.Warning, string.Format(InvalidTypeWarning, obj.name));
55 |
56 | return false;
57 | }
58 |
59 | var childCount = monoBehaviour.transform.childCount;
60 | if (childCount > 0)
61 | {
62 | DispatchLogEvent(obj, LogType.Error, string.Format(ChildObjectsPresentWarning, obj.name));
63 | }
64 |
65 | return childCount == 0;
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ObjectValidators/ZeroChildrenObjectValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 24a029446bc8114468778e046915f809
3 | timeCreated: 1511808164
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/OnlyIncludeInTestsAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// is a meant to identify classes used
30 | /// for unit-test validation so that they are only used for unit-tests and do not get caught up in
31 | /// production validation.
32 | ///
33 | [AttributeUsage(AttributeTargets.Class)]
34 | public sealed class OnlyIncludeInTestsAttribute : Attribute
35 | {
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/OnlyIncludeInTestsAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: afb830123f483d342b470fc218bc9fcd
3 | timeCreated: 1512490537
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ProjectValidators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0963e437afceeed47a6a24a0bf673e3a
3 | folderAsset: yes
4 | timeCreated: 1513089461
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ProjectValidators/AssetBundlePathProjectValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 36e7fb9523561fc4db604ddbd6007fb0
3 | timeCreated: 1513107782
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ProjectValidators/AssetProjectValidatorBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5cfbbc28a56ec2141a6132be55420daf
3 | timeCreated: 1513440455
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ProjectValidators/ProjectValidatorBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 339daa6c834bc7f46932a68fbf0c04ea
3 | timeCreated: 1513089461
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ProjectValidators/ResourceContractProjectValidator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fd30c9b987bb8c146af6dff07f7d4900
3 | timeCreated: 1513101143
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/SceneValidationMode.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using System.Runtime.Serialization;
26 |
27 | namespace JCMG.AssetValidator.Editor
28 | {
29 | [Serializable]
30 | public enum SceneValidationMode
31 | {
32 | [EnumMember(Value = EditorConstants.ValidationModeNone)]
33 | None,
34 |
35 | [EnumMember(Value = EditorConstants.ValidationModeActive)]
36 | ActiveScene,
37 |
38 | [EnumMember(Value = EditorConstants.ValidationModeAllScenes)]
39 | AllScenes,
40 |
41 | [EnumMember(Value = EditorConstants.ValidationModeAllBuildScenes)]
42 | AllBuildScenes,
43 |
44 | [EnumMember(Value = EditorConstants.ValidationModeAllBuildAndAssetBundleScenes)]
45 | AllBuildAndAssetBundleScenes
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/SceneValidationMode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bba44eeb0a6bea64293a5e016c083bda
3 | timeCreated: 1511876901
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ValidatorAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator.Editor
27 | {
28 | ///
29 | /// uniquely identifies a closed validator implementation by way of
30 | /// a unique .
31 | ///
32 | public class ValidatorAttribute : Attribute
33 | {
34 | ///
35 | /// A unique identifier for this validator.
36 | ///
37 | public string Symbol { get; }
38 |
39 | ///
40 | /// Identifies a Validator by way of a unique symbol.
41 | ///
42 | ///
43 | public ValidatorAttribute(string symbol)
44 | {
45 | Symbol = symbol;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Editor/Validators/ValidatorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 15abfa015f3888e4badb1865fce47edd
3 | timeCreated: 1512489210
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a9c3ea763dcd4bd290781e18cd7c5960
3 | timeCreated: 1549873846
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/FieldAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using System.Diagnostics;
26 | using UnityEngine;
27 |
28 | namespace JCMG.AssetValidator
29 | {
30 | ///
31 | /// A targets a public instance field and is intended to have a matching
32 | /// subclass that is designed to validate that field. It is only available in
33 | /// the editor.
34 | ///
35 | [AttributeUsage(AttributeTargets.Field), Conditional("UNITY_EDITOR")]
36 | public abstract class FieldAttribute : PropertyAttribute
37 | {
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/FieldAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c9ff67ca74f49f4f987853d425a4db9
3 | timeCreated: 1509897135
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/IsProjectReferenceAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | namespace JCMG.AssetValidator
25 | {
26 | ///
27 | /// Instance fields decorated with must reference on object in
28 | /// the project versus the scene, otherwise it will give off a validation error.
29 | ///
30 | public sealed class IsProjectReferenceAttribute : FieldAttribute
31 | {
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/IsProjectReferenceAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5493cb42ac4d8474dbea4a0a28ff93d6
3 | timeCreated: 1512847176
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/IsSceneReferenceAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | namespace JCMG.AssetValidator
25 | {
26 | ///
27 | /// Instance fields decorated with must reference on object in
28 | /// the scene versus the project, otherwise it will give off a validation error.
29 | ///
30 | public sealed class IsSceneReferenceAttribute : FieldAttribute
31 | {
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/IsSceneReferenceAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8f0717173d6948099257e75bb59936b
3 | timeCreated: 1512847176
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/NonNullAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | namespace JCMG.AssetValidator
25 | {
26 | ///
27 | /// Instance fields decorated with cannot be null
28 | ///
29 | public sealed class NonNullAttribute : FieldAttribute
30 | {
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/NonNullAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 91b09509f180dc24baf9c43d0f66d655
3 | timeCreated: 1509839176
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/ResourcePathAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator
27 | {
28 | ///
29 | /// Fields decorated with indicates that the
30 | /// method return value resolves to a path to an asset in a
31 | /// Resources folder.
32 | ///
33 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
34 | public sealed class ResourcePathAttribute : FieldAttribute
35 | {
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/FieldAttributes/ResourcePathAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fea2b8f47e968e54bb9b1cc56427185d
3 | timeCreated: 1512578830
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/JCMG.AssetValidator.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "JCMG.AssetValidator",
3 | "references": [],
4 | "optionalUnityReferences": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": false
8 | }
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/JCMG.AssetValidator.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d670485e7a11a2f49a4a217f5da569e0
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/ObjectAttributes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a328f757caf47d8a5741f1bff39ed21
3 | timeCreated: 1549873878
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/ObjectAttributes/HasComponentAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f9f48e5a0207993439deba95422441b8
3 | timeCreated: 1511960083
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/ObjectAttributes/ValidateAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using System.Diagnostics;
26 | using UnityEngine;
27 |
28 | namespace JCMG.AssetValidator
29 | {
30 | ///
31 | /// is used by the validator editor tools to determine which
32 | /// or classes should be targeted for
33 | /// validation. It is necessary when using Field Validation Attributes that
34 | /// is on the class whose Fields are being decorated. It is only available in the editor and will be
35 | /// conditionally compiled out at runtime.
36 | ///
37 | [AttributeUsage(AttributeTargets.Class), Conditional("UNITY_EDITOR")]
38 | public class ValidateAttribute : Attribute
39 | {
40 | ///
41 | /// The of object that this attribute should be used on.
42 | ///
43 | public UnityTargetType UnityTargetType { get; }
44 |
45 | public ValidateAttribute()
46 | {
47 | UnityTargetType = UnityTargetType.MonoBehavior;
48 | }
49 |
50 | ///
51 | /// Constructor to allow specifying the of object that this should be
52 | /// validating.
53 | ///
54 | /// The of object that this attribute should be used on.
55 | protected ValidateAttribute(UnityTargetType unityTargetType)
56 | {
57 | UnityTargetType = unityTargetType;
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/ObjectAttributes/ValidateAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab286d86d6daa0d448cf01507b64160f
3 | timeCreated: 1509839176
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/ObjectAttributes/ZeroChildrenAttribute.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator
27 | {
28 | ///
29 | /// Any decorated with must not have any
30 | /// child (s) underneath it either in a scene or as a prefab.
31 | ///
32 | public sealed class ZeroChildrenAttribute : ValidateAttribute
33 | {
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/ObjectAttributes/ZeroChildrenAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 54b1451f72ad8c640aca70ff3bf4460d
3 | timeCreated: 1511732332
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d8e5732fb403a7245ba5d2ec043eb26a
3 | folderAsset: yes
4 | timeCreated: 1511379405
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/MonoBehaviourTwo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator
27 | {
28 | ///
29 | /// This is a non-editor derived class that is solely used for unit tests.
30 | ///
31 | public class MonoBehaviourTwo : MonoBehaviour
32 | {
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/MonoBehaviourTwo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 613f9f01801c2004db4a7b40cf188afb
3 | timeCreated: 1511379301
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/ValidatedMonoBehaviourTwo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using UnityEngine;
25 |
26 | namespace JCMG.AssetValidator
27 | {
28 | [Validate]
29 | public class ValidatedMonoBehaviourTwo : MonoBehaviourTwo
30 | {
31 | [NonNull]
32 | [SerializeField]
33 | private GameObject gameObjectRef;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/ValidatedMonoBehaviourTwo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4adb61f0c1219f247bedcc683b4e7a12
3 | timeCreated: 1511379469
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/resource_unit_test.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d1295b1cd7bb7524fa1cd2ef1a87e1c2
3 | folderAsset: yes
4 | timeCreated: 1512578971
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/resource_unit_test/ProjectPrefabSearchTest.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1001 &100100000
4 | Prefab:
5 | m_ObjectHideFlags: 1
6 | serializedVersion: 2
7 | m_Modification:
8 | m_TransformParent: {fileID: 0}
9 | m_Modifications: []
10 | m_RemovedComponents: []
11 | m_ParentPrefab: {fileID: 0}
12 | m_RootGameObject: {fileID: 1607829227446412}
13 | m_IsPrefabParent: 1
14 | --- !u!1 &1607829227446412
15 | GameObject:
16 | m_ObjectHideFlags: 0
17 | m_PrefabParentObject: {fileID: 0}
18 | m_PrefabInternal: {fileID: 100100000}
19 | serializedVersion: 5
20 | m_Component:
21 | - component: {fileID: 4708264759714426}
22 | - component: {fileID: 114443001790271580}
23 | m_Layer: 0
24 | m_Name: ProjectPrefabSearchTest
25 | m_TagString: Untagged
26 | m_Icon: {fileID: 0}
27 | m_NavMeshLayer: 0
28 | m_StaticEditorFlags: 0
29 | m_IsActive: 1
30 | --- !u!4 &4708264759714426
31 | Transform:
32 | m_ObjectHideFlags: 1
33 | m_PrefabParentObject: {fileID: 0}
34 | m_PrefabInternal: {fileID: 100100000}
35 | m_GameObject: {fileID: 1607829227446412}
36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
37 | m_LocalPosition: {x: 0, y: 0, z: 0}
38 | m_LocalScale: {x: 1, y: 1, z: 1}
39 | m_Children: []
40 | m_Father: {fileID: 0}
41 | m_RootOrder: 0
42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
43 | --- !u!114 &114443001790271580
44 | MonoBehaviour:
45 | m_ObjectHideFlags: 1
46 | m_PrefabParentObject: {fileID: 0}
47 | m_PrefabInternal: {fileID: 100100000}
48 | m_GameObject: {fileID: 1607829227446412}
49 | m_Enabled: 1
50 | m_EditorHideFlags: 0
51 | m_Script: {fileID: 11500000, guid: 4adb61f0c1219f247bedcc683b4e7a12, type: 3}
52 | m_Name:
53 | m_EditorClassIdentifier:
54 | gameObjectRef: {fileID: 0}
55 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/resource_unit_test/ProjectPrefabSearchTest.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 100c28d932e8a89488656aba31b3d38a
3 | timeCreated: 1516799086
4 | licenseType: Free
5 | NativeFormatImporter:
6 | externalObjects: {}
7 | mainObjectFileID: 100100000
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/resource_unit_test/readme.md:
--------------------------------------------------------------------------------
1 | In order to include the unit tests for the ```ResourcePathValidator```, but not have unecessary *Resources* assets included with this project I have set this test to be ignored and renamed the *Resources* folder it was using for the unit test to *resource_unit_test*. In order to run this unit test, comment out the ```[Ignore]``` attribute in the unit test class ```ResourceContractProjectValidatorTests``` and rename this folder to *Resources*
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/resource_unit_test/readme.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a850518c3a7d2994189bb2ff94e861e2
3 | timeCreated: 1513959520
4 | licenseType: Free
5 | DefaultImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/unit_test_bundle.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 90021bae6a84aff4baa78d677d340d94
3 | folderAsset: yes
4 | timeCreated: 1513107949
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/unit_test_bundle/bundle_item.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 630331e33dc74f7499370f0d49e2a90d
3 | timeCreated: 1513109856
4 | licenseType: Free
5 | DefaultImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/unit_test_bundle/readme.md:
--------------------------------------------------------------------------------
1 | Mark this folder as an AssetBundle named *unit_test_bundle* and uncheck ignore on the unit tests class named ```AssetBundlePathProjectValidatorTests``` to run the unit tests for the ```AssetBundlePathValidator```.
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/Tests/unit_test_bundle/readme.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 751e3f05b15c75641b2861fe8a7ac0a3
3 | timeCreated: 1513959366
4 | licenseType: Free
5 | DefaultImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/UnityTargetType.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 |
26 | namespace JCMG.AssetValidator
27 | {
28 | ///
29 | /// UnityTargetType describes to the validator whether or not the ObjectTargetAttribute can be used on
30 | /// a or
31 | ///
32 | [Serializable]
33 | public enum UnityTargetType
34 | {
35 | MonoBehavior = 0,
36 | ScriptableObject = 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/AssetValidator/UnityTargetType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5de77c312de869048b8470eb28f516a8
3 | timeCreated: 1511793320
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Unity/Assets/PackageManifests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4fca85018d7549e499794f85ee5cec63
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/PackageManifests/Generated.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 75206f262d32e424b859919e9ae0b5c7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/PackageManifests/Generated/0875fa0f-60cd-4029-8332-bf279970c816.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6109fe9634c1d2c418b36f4e462cb4f4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/Assets/PackageManifests/Generated/0875fa0f-60cd-4029-8332-bf279970c816/package.json:
--------------------------------------------------------------------------------
1 | {"name":"com.jeffcampbellmakesgames.assetvalidator","displayName":"JCMG Asset Validator","version":"1.1.2","unity":"2018.3","description":"The AssetValidator is an editor tool for validating scenes and assets and can be used as a continuous integration tool for testing content regression.","keywords":["CI","QA","validator","validation","testing"],"category":"Tools"}
--------------------------------------------------------------------------------
/Unity/Assets/PackageManifests/Generated/0875fa0f-60cd-4029-8332-bf279970c816/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 52646ed303c1e2e4ab528daf8d43a040
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Unity/Assets/PackageManifests/PackageManifestConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: a29f67b488b4458983fd973bbda8c8fa, type: 3}
13 | m_Name: PackageManifestConfig
14 | m_EditorClassIdentifier:
15 | packageSourcePaths:
16 | - Assets/JCMG
17 | packageDestinationPath: ../../unity-asset-validator_release
18 | packageName: com.jeffcampbellmakesgames.assetvalidator
19 | displayName: JCMG Asset Validator
20 | packageVersion: 1.1.2
21 | unityVersion: 2018.3
22 | description: The AssetValidator is an editor tool for validating scenes and assets
23 | and can be used as a continuous integration tool for testing content regression.
24 | category: Tools
25 | keywords:
26 | - CI
27 | - QA
28 | - validator
29 | - validation
30 | - testing
31 | dependencies: []
32 | _id: 0875fa0f-60cd-4029-8332-bf279970c816
33 |
--------------------------------------------------------------------------------
/Unity/Assets/PackageManifests/PackageManifestConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c19c63ccb7459da42837e0440938be10
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Unity/JCMG.AssetValidator.Editor.Tests.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
3 | True
4 | True
5 | True
6 | True
7 | True
--------------------------------------------------------------------------------
/Unity/JCMG.AssetValidator.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
3 | True
4 | True
5 | True
6 | True
7 | True
--------------------------------------------------------------------------------
/Unity/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.jeffcampbellmakesgames.packagetools": "https://github.com/jeffcampbellmakesgames/unity-package-tools.git#release/stable",
4 | "com.unity.package-manager-ui": "2.0.7",
5 | "com.unity.textmeshpro": "1.3.0",
6 | "com.unity.modules.ai": "1.0.0",
7 | "com.unity.modules.animation": "1.0.0",
8 | "com.unity.modules.assetbundle": "1.0.0",
9 | "com.unity.modules.audio": "1.0.0",
10 | "com.unity.modules.cloth": "1.0.0",
11 | "com.unity.modules.director": "1.0.0",
12 | "com.unity.modules.imageconversion": "1.0.0",
13 | "com.unity.modules.imgui": "1.0.0",
14 | "com.unity.modules.jsonserialize": "1.0.0",
15 | "com.unity.modules.particlesystem": "1.0.0",
16 | "com.unity.modules.physics": "1.0.0",
17 | "com.unity.modules.physics2d": "1.0.0",
18 | "com.unity.modules.screencapture": "1.0.0",
19 | "com.unity.modules.terrain": "1.0.0",
20 | "com.unity.modules.terrainphysics": "1.0.0",
21 | "com.unity.modules.tilemap": "1.0.0",
22 | "com.unity.modules.ui": "1.0.0",
23 | "com.unity.modules.uielements": "1.0.0",
24 | "com.unity.modules.umbra": "1.0.0",
25 | "com.unity.modules.unityanalytics": "1.0.0",
26 | "com.unity.modules.unitywebrequest": "1.0.0",
27 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
28 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
29 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
30 | "com.unity.modules.unitywebrequestwww": "1.0.0",
31 | "com.unity.modules.vehicles": "1.0.0",
32 | "com.unity.modules.video": "1.0.0",
33 | "com.unity.modules.vr": "1.0.0",
34 | "com.unity.modules.wind": "1.0.0",
35 | "com.unity.modules.xr": "1.0.0"
36 | },
37 | "lock": {
38 | "com.jeffcampbellmakesgames.packagetools": {
39 | "hash": "2c2578f315df7c37dfd9158389f2b40424b63873",
40 | "revision": "release/stable"
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Unity/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 0
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/Unity/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 |
--------------------------------------------------------------------------------
/Unity/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 |
--------------------------------------------------------------------------------
/Unity/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/DevTools/Scenes/EmptyScene.unity
10 | guid: 0de5b8aff8e34ce4994310c2181eede8
11 |
--------------------------------------------------------------------------------
/Unity/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: Hidden 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;asmdef;rsp
18 | m_ProjectGenerationRootNamespace:
19 | m_UserGeneratedProjectSuffix:
20 | m_CollabEditorSettings:
21 | inProgressEnabled: 1
22 |
--------------------------------------------------------------------------------
/Unity/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 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
40 | m_PreloadedShaders: []
41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
42 | type: 0}
43 | m_CustomRenderPipeline: {fileID: 0}
44 | m_TransparencySortMode: 0
45 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
46 | m_DefaultRenderingPath: 1
47 | m_DefaultMobileRenderingPath: 1
48 | m_TierSettings: []
49 | m_LightmapStripping: 0
50 | m_FogStripping: 0
51 | m_InstancingStripping: 0
52 | m_LightmapKeepPlain: 1
53 | m_LightmapKeepDirCombined: 1
54 | m_LightmapKeepDynamicPlain: 1
55 | m_LightmapKeepDynamicDirCombined: 1
56 | m_LightmapKeepShadowMask: 1
57 | m_LightmapKeepSubtractive: 1
58 | m_FogKeepLinear: 1
59 | m_FogKeepExp: 1
60 | m_FogKeepExp2: 1
61 | m_AlbedoSwatchInfos: []
62 | m_LightsUseLinearIntensity: 0
63 | m_LightsUseColorTemperature: 0
64 |
--------------------------------------------------------------------------------
/Unity/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 |
--------------------------------------------------------------------------------
/Unity/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 |
--------------------------------------------------------------------------------
/Unity/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 |
--------------------------------------------------------------------------------
/Unity/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-asset-validator/5015ee510fe9d5e096b0ecd961b1cf16d646111e/Unity/ProjectSettings/PresetManager.asset
--------------------------------------------------------------------------------
/Unity/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2018.3.11f1
2 |
--------------------------------------------------------------------------------
/Unity/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/Unity/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/Unity/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: 1
7 | m_TestMode: 0
8 | m_TestEventUrl:
9 | m_TestConfigUrl:
10 | m_TestInitMode: 0
11 | CrashReportingSettings:
12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate
14 | m_Enabled: 0
15 | m_CaptureEditorExceptions: 1
16 | UnityPurchasingSettings:
17 | m_Enabled: 0
18 | m_TestMode: 0
19 | UnityAnalyticsSettings:
20 | m_Enabled: 0
21 | m_InitializeOnStartup: 1
22 | m_TestMode: 0
23 | m_TestEventUrl:
24 | m_TestConfigUrl:
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/Unity/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-asset-validator/5015ee510fe9d5e096b0ecd961b1cf16d646111e/Unity/ProjectSettings/VFXManager.asset
--------------------------------------------------------------------------------