first commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Animation Clips
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 31
|
||||
Title: Check Animation Clips
|
||||
Description: Animation Clips should not have the default name 'Take 001'. This
|
||||
could lead to confusion when filtering assets by animation clips.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 0
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- Animation
|
||||
TestScript: {fileID: 11500000, guid: 7a28985886f182c4bacc89a44777c742, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0426dd01b5136a4ca1d42d312e12fad
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Animation Clips.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,32 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Audio Clipping
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 27
|
||||
Title: Check Audio Clipping
|
||||
Description: 'Audio files should not peak above the defined dB threshold of -0.3db
|
||||
|
||||
|
||||
Please
|
||||
note that lossless audio files that are imported into Unity with their Compression
|
||||
Format set to anything other than PCM can still fail the Validator. If such cases
|
||||
arise, please export your audio files with extra headroom, or set the Compression
|
||||
Format to PCM if applicable.'
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- Audio
|
||||
TestScript: {fileID: 11500000, guid: f604db0353da0cb46bb048f5cd37186f, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03c6cd398931b3e41b0784e8589e153f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Audio Clipping.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Colliders
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 4
|
||||
Title: Check Colliders
|
||||
Description: Prefabs with meshes inside them have to have colliders applied to
|
||||
them, if the Prefabs are marked as Static. Please make sure you have appropriately
|
||||
sized colliders applied to your prefabs.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 308b3d7b7a883b949a14f47cfd5c7ebe, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28ab5af444cf3c849800ed0d8f4a3102
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Colliders.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Compressed Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 22
|
||||
Title: Check Compressed Files
|
||||
Description: "Package should not contain nested .unitypackage or archive files
|
||||
that obscure most of, or the entirety of the content.\n\n.unitypackage files
|
||||
are acceptable for including setup preferences, settings, supplemental files
|
||||
for other Asset Store products, or alternative render pipeline content\n\n.zip
|
||||
files are acceptable if they are compressing files that do not natively function
|
||||
in the Unity Editor. (For example, Blender, HTML Documentation, or Visual Studio
|
||||
Projects). Such files should include 'source' in the file name (e.g. \"Blender_source.zip\"
|
||||
or \"PSDSource.zip\")."
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 84b23febe0d923842aef73b95da5f25b, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53189e6e51235b14192c4d5b3145dd27
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Compressed Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,33 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Demo Scenes
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 1
|
||||
Title: Check Demo Scenes
|
||||
Description: If your product has content to show off, it should be displayed in
|
||||
a demo scene. Please provide a practical demo with all of your assets set up.
|
||||
If your asset is based on scripting or Editor extensions, please consider adding
|
||||
a demo scene showcasing the asset or showing setup steps in the scene.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- 3D
|
||||
- 2D
|
||||
- Animation
|
||||
- Essentials
|
||||
- Templates
|
||||
- VFX
|
||||
TestScript: {fileID: 11500000, guid: f844c2dfa4669ff4eacf5591b544edaf, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f108107be07f69045813d69eff580078
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Demo Scenes.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Documentation
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 6
|
||||
Title: Check Documentation
|
||||
Description: If your asset contains any code (scripts, shaders) - we ask that you
|
||||
include offline documentation in the format of pdf or rtf with your submission,
|
||||
as it is mandatory for all packages that include scripts or other components
|
||||
that require set up. Your documentation must be organized with a table of contents
|
||||
and numbered, written in English and have no grammar mistakes. Create a setup
|
||||
guide with a step-by-step tutorial (pdf or video), as well as a script reference
|
||||
if users will need to do any coding. If your asset contains art (3D models, sprites)
|
||||
and you used code to set up a demo scene, you may skip this step.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 3c8425198983eda4c9b35aa0d59ea33c, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b03433f7977b29e4ca7e8d76393a6c26
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Documentation.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Empty Prefabs
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 5
|
||||
Title: Check Empty Prefabs
|
||||
Description: Prefabs cannot be empty, please make sure that you set up your prefabs.
|
||||
correctly.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- 2D
|
||||
- 3D
|
||||
- Animation
|
||||
- Essentials
|
||||
- Templates
|
||||
- VFX
|
||||
TestScript: {fileID: 11500000, guid: 8055bed9373283e4793463b90b42f08f, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08790ea0ed0fd274fb1df75ccc32d415
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Empty Prefabs.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check File Menu Names
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 21
|
||||
Title: Check File Menu Names
|
||||
Description: File menus should be placed under an existing menu, such as "Window/<PackageName>".
|
||||
If no existing menus are a good fit, they should be placed under a custom menu
|
||||
called "Tools".
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: d8e3b12ecc1fcd74d9a9f8d2b549fc63, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eaf232919893db04b8e05e91f6815424
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
File Menu Names.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,33 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check LODs
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 17
|
||||
Title: Check LODs
|
||||
Description: 'Prefabs containing meshes with ''LOD'' in their name must meet the
|
||||
following requirements:
|
||||
|
||||
- LOD Mesh must be referenced by an LOD Group Component
|
||||
|
||||
-
|
||||
LOD Mesh GameObject must be a child of an LOD Group Component.'
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- 3D
|
||||
- Essentials
|
||||
- Templates
|
||||
TestScript: {fileID: 11500000, guid: 43b2158602f87704fa7b91561cfc8678, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad52ffa05767e9d4bb4d92093ad68b03
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
LODs.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Line Endings
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 20
|
||||
Title: Check Line Endings
|
||||
Description: Inconsistent line endings in scripts might lead to incorrect line
|
||||
numbers in stacktraces and compiler errors. Many text editors can fix this using
|
||||
Convert Line Endings menu commands.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 85885005d1c594f42826de3555e98365, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e7b5480c1d8bda43ab4fa945939e243
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Line Endings.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Mesh Prefabs
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 2
|
||||
Title: Check Mesh Prefabs
|
||||
Description: Each mesh should have a corresponding prefab set up with all variations
|
||||
of the texture/mesh/material that you are providing. Please create prefabs for
|
||||
all of your imported objects.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 3c3d0d642ac6a6a48aa124a93dae3734, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03b362b67028eb443b7ba8b84aedd5f2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Mesh Prefabs.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Missing Components in Assets
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 9
|
||||
Title: Check Missing Components in Assets
|
||||
Description: We do not allow missing or broken material/texture/prefab/script connections
|
||||
in your package. Please make sure none of your assets have missing components.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 22d8f814e2363e34ea220736a4042728, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a3d0b3827fc16347867bee335e8f4ea
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Missing Components in Assets.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Missing Components in Scenes
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 10
|
||||
Title: Check Missing Components in Scenes
|
||||
Description: We do not allow missing or broken material/texture/prefab/script connections
|
||||
in your package. Please make sure none of your scene objects have missing components.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 511e76d0ebcb23d40a7b49dda0e2980f, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc2cb4e6635aa334ea4a52e2e3ce57c8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Missing Components in Scenes.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,29 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Model Import Logs
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 32
|
||||
Title: Check Model Import Logs
|
||||
Description: Model assets should work without issues. Please make sure that there
|
||||
are no errors or warnings when these models are imported.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- 3D
|
||||
- Animation
|
||||
- Essentials
|
||||
- Templates
|
||||
TestScript: {fileID: 11500000, guid: 98f3ec209166855408eaf4abe5bff591, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c889cdd91c2f41941a14363dad7a1a38
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Model Import Logs.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Model Orientation
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 7
|
||||
Title: Check Model Orientation
|
||||
Description: 'Meshes should be facing the correct way. The proper facing is: Z
|
||||
vector is forward, Y vector is up, X vector is right.'
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 56cdcdc41a80fbc46b5b2b83ec8d66d7, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45b2b11da67e8864aacc62d928524b4c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Model Orientation.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,24 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Model Types
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 23
|
||||
Title: Check Model Types
|
||||
Description: Mesh assets must be either .fbx, .dae, .abc, or .obj file types.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 428b1fb838e6f5a469bbfd26ca3fbfd2, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffef800a102b0e04cae1a3b98549ef1b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Model Types.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Normal Map Textures
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 26
|
||||
Title: Check Normal Map Textures
|
||||
Description: Textures that are assigned to Materials as Normal Maps should have
|
||||
their import Texture Type set to 'Normal Map'
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: d55cea510248f814eb2194c2b53f88d2, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 241ad0174fcadb64da867011d196acbb
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Normal Map Textures.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,24 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Package Size
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 30
|
||||
Title: Check Package Size
|
||||
Description: Package submissions should not be more than 6 GB in size
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 0
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: ee88143d11c82ff498e8318602cf22f8, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5da4c440d3728ba40b183c1de4a1c384
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Package Size.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Particle Systems
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 25
|
||||
Title: Check Particle Systems
|
||||
Description: All Particle Systems should be saved as Prefabs
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- VFX
|
||||
TestScript: {fileID: 11500000, guid: 6a623f7988c75884bb17b169ccd3e993, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87da7eaed3cee0d4b8ada0b500e3a958
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Particle Systems.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Path Lengths
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 28
|
||||
Title: Check Path Lengths
|
||||
Description: Package content file paths should not be excessively lengthened. File
|
||||
paths for assets must be under 140 characters
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: ae379305e9165e84584373a8272c09e7, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21f8ec0602ffac045b1f4a93f8a9b555
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Path Lengths.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,28 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Prefab Transforms
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 3
|
||||
Title: Check Prefab Transforms
|
||||
Description: Prefabs must have their position/rotation set to 0, and their scale
|
||||
set to 1.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- 3D
|
||||
- Essentials
|
||||
- Templates
|
||||
TestScript: {fileID: 11500000, guid: f712c17a60bf2d049a4e61c8f79e56c2, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 700026f446833f649a3c63b33a90a295
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Prefab Transforms.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Script Compilation
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 29
|
||||
Title: Check Script Compilation
|
||||
Description: Scripts in the package must compile successfully and not result in
|
||||
compilation errors
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 59db88f43969db8499299bce7f4fb967, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 339e21c955642a04289482aa923e10b6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Script Compilation.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Shader Compilation
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 18
|
||||
Title: Check Shader Compilation
|
||||
Description: Please make sure the shaders inside your package do not have errors
|
||||
and compile successfully.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 7abb278a6082bde4391e0779394cb85b, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1450037453608204a989ff95dca62fae
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Shader Compilation.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Texture Dimensions
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 24
|
||||
Title: Check Texture Dimensions
|
||||
Description: Dimensions of textures, where appropriate, should have pixel counts
|
||||
that are a power of 2
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 073f1dacf3da34d4783140ae9d485d5f, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c23253393b8e28846b8e02aeaee7e152
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Texture Dimensions.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Check Type Namespaces
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 19
|
||||
Title: Check Type Namespaces
|
||||
Description: Types in your scripts (classes, interfaces, structs, enums) should
|
||||
be nested under a namespace block to prevent them from being mistaken for other
|
||||
potential types and for better organization as a whole
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 279249fa7ef8c2446b3a9f013eeedbf0, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd110ee16e8de4d48a602349ed7a0b25
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Check
|
||||
Type Namespaces.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,27 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Remove Executable Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 14
|
||||
Title: Remove Executable Files
|
||||
Description: Your package must not contain an .exe, installer programs or applications.
|
||||
If your plugin requires an external program to run, please remove the installer
|
||||
program from your package and write the instructions on how to download and install
|
||||
the installer program in your documentation.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 8e4450592cc60e54286ad089b66db94d, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e996c53186de96e49a742d414648a809
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Remove
|
||||
Executable Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,30 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Remove JPG Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 8
|
||||
Title: Remove JPG Files
|
||||
Description: We do not allow texture images that are saved in lossy formats. Please
|
||||
save all of your images as lossless format file types, such as PNG, TGA, or PSD.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- 2D
|
||||
- 3D
|
||||
- Animation
|
||||
- Essentials
|
||||
- VFX/Shaders
|
||||
TestScript: {fileID: 11500000, guid: 5634a12b3a8544c4585bbc280ae59ce2, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 781021ae3aa6570468e08d78e3195127
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Remove
|
||||
JPG Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Remove JavaScript Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 11
|
||||
Title: Remove JavaScript Files
|
||||
Description: JavaScript / UnityScript files are not allowed, as they are no longer
|
||||
supported.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: ab1676bde9afba442b35fd3319c18063, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf01c18b66907f54c99517f6a877e3e0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Remove
|
||||
JavaScript Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,32 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Remove Lossy Audio Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 12
|
||||
Title: Remove Lossy Audio Files
|
||||
Description: 'We do not recommend audio files that are saved as .mp3 or .ogg. Please
|
||||
save all of your audio as lossless format file types, such as .wav. If you have
|
||||
non-lossy alternative files to your lossy audio files, please make sure to name
|
||||
them identically to avoid rejection. For example: ''shout.mp3'', ''shout.wav''.
|
||||
Listing of the format in the file name is also allowed and accounted for by the
|
||||
validator. For example: ''taunt MP3.mp3'', ''taunt WAV.wav''.'
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter:
|
||||
- Audio
|
||||
- Essentials
|
||||
- Templates
|
||||
TestScript: {fileID: 11500000, guid: b7205a85061273a4eb50586f13f35d35, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a48657926de5cfb47ac559a7108d03ee
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Remove
|
||||
Lossy Audio Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Remove Mixamo Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 15
|
||||
Title: Remove Mixamo Files
|
||||
Description: We do not allow or accept packages files that were made with third-party
|
||||
software, such as Mixamo, Fuse, etc. because these files are under licensing
|
||||
that does not agree with the Asset Store End User License Agreement (EULA).
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: 9df432e52aa958b44bb5e20c13d16552, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0a44055f786ec64f86a07a214d5f831
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Remove
|
||||
Mixamo Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,25 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Remove SpeedTree Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 16
|
||||
Title: Remove SpeedTree Files
|
||||
Description: You cannot redistribute SpeedTree files on other marketplaces. Please
|
||||
remove all SpeedTree files that are in this package.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 0
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: e06bb7e0aa4f9944abc18281c002dff4, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 305bbe67f7c644d18bc8a5b2273aa6a4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Remove
|
||||
SpeedTree Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,26 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d813ff809ae82f643bf975031305d541, type: 3}
|
||||
m_Name: Remove Video Files
|
||||
m_EditorClassIdentifier:
|
||||
HasBeenInitialized: 1
|
||||
Id: 13
|
||||
Title: Remove Video Files
|
||||
Description: You cannot include a video file in your package. Please upload your
|
||||
video file to an online video hosting website (Youtube, Vimeo, etc.) and include
|
||||
the link to the video in your written documentation.
|
||||
CategoryInfo:
|
||||
IsFailFilter: 1
|
||||
IsInclusiveFilter: 1
|
||||
AppliesToSubCategories: 1
|
||||
Filter: []
|
||||
TestScript: {fileID: 11500000, guid: f99724c71b0de66419b5d6e8e9bfcc2d, type: 3}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 893a0df188c2026438be48eed39b301f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Remove
|
||||
Video Files.asset
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: daedaf78228b5184297e7ca334ea2a12
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,55 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckAnimationClips : ITestScript
|
||||
{
|
||||
private static readonly string[] InvalidNames = new[] { "Take 001" };
|
||||
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
var badModels = new Dictionary<UnityObject, List<UnityObject>>();
|
||||
var models = AssetUtility.GetObjectsFromAssets<UnityObject>(config.ValidationPaths, AssetType.Model);
|
||||
|
||||
foreach(var model in models)
|
||||
{
|
||||
var badClips = new List<UnityObject>();
|
||||
var clips = AssetDatabase.LoadAllAssetsAtPath(AssetUtility.ObjectToAssetPath(model));
|
||||
foreach(var clip in clips)
|
||||
{
|
||||
if (InvalidNames.Any(x => x.ToLower().Equals(clip.name.ToLower())))
|
||||
{
|
||||
badClips.Add(clip);
|
||||
}
|
||||
}
|
||||
|
||||
if (badClips.Count > 0)
|
||||
badModels.Add(model, badClips);
|
||||
}
|
||||
|
||||
if(badModels.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following models have animation clips with invalid names. Animation clip names should be unique and reflective of the animation itself");
|
||||
foreach(var kvp in badModels)
|
||||
{
|
||||
result.AddMessage(AssetUtility.ObjectToAssetPath(kvp.Key), null, kvp.Value.ToArray());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.AddMessage("No animation clips with invalid names were found!");
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a28985886f182c4bacc89a44777c742
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckAnimationClips.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,119 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckAudioClipping : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
// How many peaks above threshold are required for Audio Clips to be considered clipping
|
||||
const int TOLERANCE = 2;
|
||||
// Min. amount of consecutive samples above threshold required for peak detection
|
||||
const int PEAK_STEPS = 1;
|
||||
// Clipping threshold. More lenient here than Submission Guidelines (-0.3db) due to the problematic nature of
|
||||
// correctly determining how sensitive the audio clipping flagging should be, as well as to account for any
|
||||
// distortion introduced when AudioClips are compresssed after importing to Unity.
|
||||
const float THRESHOLD = -0.05f;
|
||||
// Samples for 16-bit audio files
|
||||
const float S16b = 32767f;
|
||||
float clippingThreshold = (S16b - (S16b / (2 * Mathf.Log10(1/S16b)) * THRESHOLD)) / S16b;
|
||||
TestResult result = new TestResult();
|
||||
var clippingAudioClips = new Dictionary<AudioClip, string>();
|
||||
|
||||
var losslessAudioClips = AssetUtility.GetObjectsFromAssets(config.ValidationPaths, AssetType.NonLossyAudio).Select(x => x as AudioClip).ToList();
|
||||
foreach(var clip in losslessAudioClips)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(clip.GetInstanceID());
|
||||
|
||||
if (IsClipping(clip, TOLERANCE, PEAK_STEPS, clippingThreshold))
|
||||
clippingAudioClips.Add(clip, path);
|
||||
}
|
||||
|
||||
var lossyAudioClips = AssetUtility.GetObjectsFromAssets(config.ValidationPaths, AssetType.LossyAudio).Select(x => x as AudioClip).ToList();
|
||||
foreach (var clip in lossyAudioClips)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(clip.GetInstanceID());
|
||||
|
||||
if (IsClipping(clip, TOLERANCE, PEAK_STEPS, clippingThreshold))
|
||||
clippingAudioClips.Add(clip, path);
|
||||
}
|
||||
|
||||
if (clippingAudioClips.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following AudioClips are clipping or are very close to 0db ceiling. Please ensure your exported audio files have at least 0.3db of headroom (should peak at no more than -0.3db):", null, clippingAudioClips.Select(x => x.Key).ToArray());
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No clipping audio files were detected.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool IsClipping(AudioClip clip, int tolerance, int peakTolerance, float clippingThreshold)
|
||||
{
|
||||
if (DetectNumPeaksAboveThreshold(clip, peakTolerance, clippingThreshold) >= tolerance)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private int DetectNumPeaksAboveThreshold(AudioClip clip, int peakTolerance, float clippingThreshold)
|
||||
{
|
||||
float[] samples = new float[clip.samples * clip.channels];
|
||||
var data = clip.GetData(samples, 0);
|
||||
|
||||
float[] samplesLeft = samples.Where((s, i) => i % 2 == 0).ToArray();
|
||||
float[] samplesRight = samples.Where((s, i) => i % 2 == 1).ToArray();
|
||||
|
||||
int peaks = 0;
|
||||
|
||||
peaks = GetPeaksInChannel(samplesLeft, peakTolerance, clippingThreshold) +
|
||||
GetPeaksInChannel(samplesRight, peakTolerance, clippingThreshold);
|
||||
|
||||
return peaks;
|
||||
}
|
||||
|
||||
private int GetPeaksInChannel(float[] samples, int peakTolerance, float clippingThreshold)
|
||||
{
|
||||
int peaks = 0;
|
||||
bool evalPeak = false;
|
||||
int peakSteps = 0;
|
||||
int step = 0;
|
||||
|
||||
while (step < samples.Length)
|
||||
{
|
||||
if (Mathf.Abs(samples[step]) >= clippingThreshold && evalPeak)
|
||||
{
|
||||
peakSteps++;
|
||||
}
|
||||
|
||||
if (Mathf.Abs(samples[step]) >= clippingThreshold && !evalPeak)
|
||||
{
|
||||
evalPeak = true;
|
||||
peakSteps++;
|
||||
}
|
||||
|
||||
if (Mathf.Abs(samples[step]) < clippingThreshold && evalPeak)
|
||||
{
|
||||
evalPeak = false;
|
||||
if (peakSteps >= peakTolerance)
|
||||
peaks++;
|
||||
peakSteps = 0;
|
||||
}
|
||||
|
||||
step++;
|
||||
}
|
||||
|
||||
return peaks;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f604db0353da0cb46bb048f5cd37186f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckAudioClipping.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,44 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckColliders : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var prefabs = AssetUtility.GetObjectsFromAssets<GameObject>(config.ValidationPaths, AssetType.Prefab);
|
||||
var badPrefabs = new List<GameObject>();
|
||||
|
||||
foreach (var p in prefabs)
|
||||
{
|
||||
var meshes = MeshUtility.GetCustomMeshesInObject(p);
|
||||
|
||||
if (!p.isStatic || !meshes.Any())
|
||||
continue;
|
||||
|
||||
var colliders = p.GetComponentsInChildren<Collider>(true);
|
||||
if (!colliders.Any())
|
||||
badPrefabs.Add(p);
|
||||
}
|
||||
|
||||
if (badPrefabs.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("All found prefabs have colliders!");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following prefabs contain meshes, but colliders were not found", null, badPrefabs.ToArray());
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 308b3d7b7a883b949a14f47cfd5c7ebe
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckColliders.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,110 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckCompressedFiles : ITestScript
|
||||
{
|
||||
private enum ArchiveResult
|
||||
{
|
||||
Allowed,
|
||||
NotAllowed,
|
||||
TarGzWithIssues,
|
||||
ZipWithIssues
|
||||
}
|
||||
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var checkedArchives = new Dictionary<UnityObject, ArchiveResult>();
|
||||
|
||||
// Retrieving assets via GetObjectsFromAssets() is insufficient because
|
||||
// archives might be renamed and not use the expected extension
|
||||
var allAssetPaths = AssetUtility.GetAssetPathsFromAssets(config.ValidationPaths, AssetType.All);
|
||||
|
||||
foreach (var assetPath in allAssetPaths)
|
||||
{
|
||||
FileSignatureUtility.ArchiveType archiveType;
|
||||
if ((archiveType = FileSignatureUtility.GetArchiveType(assetPath)) == FileSignatureUtility.ArchiveType.None)
|
||||
continue;
|
||||
|
||||
var archiveObj = AssetUtility.AssetPathToObject(assetPath);
|
||||
|
||||
switch (archiveType)
|
||||
{
|
||||
case FileSignatureUtility.ArchiveType.TarGz:
|
||||
if (assetPath.ToLower().EndsWith(".unitypackage"))
|
||||
checkedArchives.Add(archiveObj, ArchiveResult.Allowed);
|
||||
else
|
||||
checkedArchives.Add(archiveObj, ArchiveResult.TarGzWithIssues);
|
||||
break;
|
||||
case FileSignatureUtility.ArchiveType.Zip:
|
||||
if (FileNameContainsKeyword(assetPath, "source") && assetPath.ToLower().EndsWith(".zip"))
|
||||
checkedArchives.Add(archiveObj, ArchiveResult.Allowed);
|
||||
else
|
||||
checkedArchives.Add(archiveObj, ArchiveResult.ZipWithIssues);
|
||||
break;
|
||||
default:
|
||||
checkedArchives.Add(archiveObj, ArchiveResult.NotAllowed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(checkedArchives.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No archives were found in the package content!");
|
||||
return result;
|
||||
}
|
||||
|
||||
if(checkedArchives.Any(x => x.Value == ArchiveResult.Allowed))
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Warning;
|
||||
result.AddMessage("The following archives of allowed format were found in the package content.\n" +
|
||||
"Please make sure they adhere to the nested archive guidelines:", null,
|
||||
checkedArchives.Where(x => x.Value == ArchiveResult.Allowed).Select(x => x.Key).ToArray());
|
||||
}
|
||||
|
||||
if (checkedArchives.Any(x => x.Value == ArchiveResult.TarGzWithIssues))
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following .gz archives were found in the package content.\n" +
|
||||
"<22> Gz archives are only allowed in form of '.unitypackage' files", null,
|
||||
checkedArchives.Where(x => x.Value == ArchiveResult.TarGzWithIssues).Select(x => x.Key).ToArray());
|
||||
}
|
||||
|
||||
if (checkedArchives.Any(x => x.Value == ArchiveResult.ZipWithIssues))
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following .zip archives were found in the package content.\n" +
|
||||
"<22> Zip archives should contain the keyword 'source' in the file name", null,
|
||||
checkedArchives.Where(x => x.Value == ArchiveResult.ZipWithIssues).Select(x => x.Key).ToArray());
|
||||
}
|
||||
|
||||
if (checkedArchives.Any(x => x.Value == ArchiveResult.NotAllowed))
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following archives are using formats that are not allowed:", null,
|
||||
checkedArchives.Where(x => x.Value == ArchiveResult.NotAllowed).Select(x => x.Key).ToArray());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool FileNameContainsKeyword(string filePath, string keyword)
|
||||
{
|
||||
var fileInfo = new FileInfo(filePath);
|
||||
|
||||
if (!fileInfo.Exists)
|
||||
return false;
|
||||
|
||||
return fileInfo.Name.Remove(fileInfo.Name.Length - fileInfo.Extension.Length).ToLower().Contains(keyword.ToLower());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84b23febe0d923842aef73b95da5f25b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckCompressedFiles.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,161 @@
|
||||
using AssetStoreTools.Utility.Json;
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckDemoScenes : ITestScript
|
||||
{
|
||||
private class DemoSceneScanResult
|
||||
{
|
||||
public List<UnityObject> ValidAdbScenes;
|
||||
public List<string> HybridScenePaths;
|
||||
public List<UnityObject> NestedUnityPackages;
|
||||
}
|
||||
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult();
|
||||
var demoSceneScanResult = CheckForDemoScenes(config);
|
||||
|
||||
// Valid demo scenes were found in ADB
|
||||
if (demoSceneScanResult.ValidAdbScenes.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("Demo scenes found", null, demoSceneScanResult.ValidAdbScenes.ToArray());
|
||||
return result;
|
||||
}
|
||||
|
||||
// Valid demo scenes found in UPM package.json
|
||||
if (demoSceneScanResult.HybridScenePaths.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
|
||||
var upmSampleSceneList = string.Join("\n-", demoSceneScanResult.HybridScenePaths);
|
||||
upmSampleSceneList = upmSampleSceneList.Insert(0, "-");
|
||||
|
||||
result.AddMessage($"Demo scenes found:\n{upmSampleSceneList}");
|
||||
return result;
|
||||
}
|
||||
|
||||
// No valid scenes found, but package contains nested .unitypackages
|
||||
if (demoSceneScanResult.NestedUnityPackages.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Warning;
|
||||
result.AddMessage("Could not find any valid Demo scenes in the selected validation paths.");
|
||||
result.AddMessage("The following nested .unitypackage files were found. " +
|
||||
"If they contain any demo scenes, you can ignore this warning.", null, demoSceneScanResult.NestedUnityPackages.ToArray());
|
||||
return result;
|
||||
}
|
||||
|
||||
// No valid scenes were found and there is nothing pointing to their inclusion in the package
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("Could not find any valid Demo Scenes in the selected validation paths.");
|
||||
return result;
|
||||
}
|
||||
|
||||
private DemoSceneScanResult CheckForDemoScenes(ValidationTestConfig config)
|
||||
{
|
||||
var scanResult = new DemoSceneScanResult();
|
||||
scanResult.ValidAdbScenes = CheckForDemoScenesInAssetDatabase(config);
|
||||
scanResult.HybridScenePaths = CheckForDemoScenesInUpmSamples(config);
|
||||
scanResult.NestedUnityPackages = CheckForNestedUnityPackages(config);
|
||||
|
||||
return scanResult;
|
||||
}
|
||||
|
||||
private List<UnityObject> CheckForDemoScenesInAssetDatabase(ValidationTestConfig config)
|
||||
{
|
||||
var scenePaths = AssetUtility.GetAssetPathsFromAssets(config.ValidationPaths, AssetType.Scene).ToArray();
|
||||
if (scenePaths.Length == 0)
|
||||
return new List<UnityObject>();
|
||||
|
||||
var originalScenePath = SceneUtility.CurrentScenePath;
|
||||
var validScenePaths = scenePaths.Where(CanBeDemoScene).ToArray();
|
||||
SceneUtility.OpenScene(originalScenePath);
|
||||
|
||||
if (validScenePaths.Length == 0)
|
||||
return new List<UnityObject>();
|
||||
|
||||
return validScenePaths.Select(x => AssetDatabase.LoadAssetAtPath<UnityObject>(x)).ToList();
|
||||
}
|
||||
|
||||
private bool CanBeDemoScene(string scenePath)
|
||||
{
|
||||
// Check skybox
|
||||
var sceneSkyboxPath = AssetUtility.ObjectToAssetPath(RenderSettings.skybox).Replace("\\", "").Replace("/", "");
|
||||
var defaultSkyboxPath = "Resources/unity_builtin_extra".Replace("\\", "").Replace("/", "");
|
||||
|
||||
if (!sceneSkyboxPath.Equals(defaultSkyboxPath, StringComparison.OrdinalIgnoreCase))
|
||||
return true;
|
||||
|
||||
// Check GameObjects
|
||||
SceneUtility.OpenScene(scenePath);
|
||||
var rootObjects = SceneUtility.GetRootGameObjects();
|
||||
var count = rootObjects.Length;
|
||||
|
||||
if (count == 0)
|
||||
return false;
|
||||
|
||||
if (count != 2)
|
||||
return true;
|
||||
|
||||
var cameraGOUnchanged = rootObjects.Any(o => o.TryGetComponent<Camera>(out _) && o.GetComponents(typeof(Component)).Length == 3);
|
||||
var lightGOUnchanged = rootObjects.Any(o => o.TryGetComponent<Light>(out _) && o.GetComponents(typeof(Component)).Length == 2);
|
||||
|
||||
return !cameraGOUnchanged || !lightGOUnchanged;
|
||||
}
|
||||
|
||||
private List<string> CheckForDemoScenesInUpmSamples(ValidationTestConfig config)
|
||||
{
|
||||
var scenePaths = new List<string>();
|
||||
|
||||
foreach (var path in config.ValidationPaths)
|
||||
{
|
||||
if (!File.Exists($"{path}/package.json"))
|
||||
continue;
|
||||
|
||||
var packageJsonText = File.ReadAllText($"{path}/package.json");
|
||||
var json = JSONParser.SimpleParse(packageJsonText);
|
||||
|
||||
if (!json.ContainsKey("samples") || !json["samples"].IsList() || json["samples"].AsList().Count == 0)
|
||||
continue;
|
||||
|
||||
foreach (var sample in json["samples"].AsList())
|
||||
{
|
||||
var samplePath = sample["path"].AsString();
|
||||
samplePath = $"{path}/{samplePath}";
|
||||
if (!Directory.Exists(samplePath))
|
||||
continue;
|
||||
|
||||
var sampleScenePaths = Directory.GetFiles(samplePath, "*.unity", SearchOption.AllDirectories);
|
||||
foreach (var scenePath in sampleScenePaths)
|
||||
{
|
||||
// If meta file is not found, the sample will not be included with the exported .unitypackage
|
||||
if (!File.Exists($"{scenePath}.meta"))
|
||||
continue;
|
||||
|
||||
if (!scenePaths.Contains(scenePath.Replace("\\", "/")))
|
||||
scenePaths.Add(scenePath.Replace("\\", "/"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scenePaths;
|
||||
}
|
||||
|
||||
private List<UnityObject> CheckForNestedUnityPackages(ValidationTestConfig config)
|
||||
{
|
||||
var unityPackages = AssetUtility.GetObjectsFromAssets(config.ValidationPaths, AssetType.UnityPackage).ToArray();
|
||||
return unityPackages.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f844c2dfa4669ff4eacf5591b544edaf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckDemoScenes.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,64 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckDocumentation : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var textFilePaths = AssetUtility.GetAssetPathsFromAssets(config.ValidationPaths, AssetType.Documentation).ToArray();
|
||||
var documentationFilePaths = textFilePaths.Where(CouldBeDocumentation).ToArray();
|
||||
|
||||
if (textFilePaths.Length == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("No potential documentation files ('.txt', '.pdf', " +
|
||||
"'.html', '.rtf', '.md') found within the given path.");
|
||||
}
|
||||
else if (documentationFilePaths.Length == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Warning;
|
||||
var textFileObjects = textFilePaths.Select(AssetUtility.AssetPathToObject).ToArray();
|
||||
result.AddMessage("The following files have been found to match the documentation file format," +
|
||||
" but may not be documentation in content",
|
||||
null, textFileObjects);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
var documentationFileObjects = documentationFilePaths.Select(AssetUtility.AssetPathToObject).ToArray();
|
||||
result.AddMessage("Found documentation files", null, documentationFileObjects);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool CouldBeDocumentation(string filePath)
|
||||
{
|
||||
if (filePath.EndsWith(".pdf"))
|
||||
return true;
|
||||
|
||||
using (var fs = File.Open(filePath, FileMode.Open))
|
||||
using (var bs = new BufferedStream(fs))
|
||||
using (var sr = new StreamReader(bs))
|
||||
{
|
||||
string line;
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
var mentionsDocumentation = line.IndexOf("documentation", StringComparison.OrdinalIgnoreCase) >= 0;
|
||||
if (mentionsDocumentation)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c8425198983eda4c9b35aa0d59ea33c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckDocumentation.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,37 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckEmptyPrefabs : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var prefabs = AssetUtility.GetObjectsFromAssets<GameObject>(config.ValidationPaths, AssetType.Prefab);
|
||||
var badPrefabs = new List<GameObject>();
|
||||
|
||||
foreach (var p in prefabs)
|
||||
{
|
||||
if (p.GetComponents<Component>().Length == 1 && p.transform.childCount == 0)
|
||||
badPrefabs.Add(p);
|
||||
}
|
||||
|
||||
if (badPrefabs.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No empty prefabs were found!");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following prefabs are empty", null, badPrefabs.ToArray());
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8055bed9373283e4793463b90b42f08f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckEmptyPrefabs.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,142 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckFileMenuNames : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var bindingFlags = BindingFlags.Public | BindingFlags.NonPublic |
|
||||
BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
|
||||
|
||||
#region Scripts
|
||||
|
||||
var scripts = AssetUtility.GetObjectsFromAssets<MonoScript>(config.ValidationPaths, AssetType.MonoScript).ToArray();
|
||||
var scriptTypes = ScriptUtility.GetTypesFromScriptAssets(scripts);
|
||||
var affectedScripts = new Dictionary<MonoScript, List<string>>();
|
||||
|
||||
foreach (var kvp in scriptTypes)
|
||||
{
|
||||
var badMethods = new List<string>();
|
||||
foreach (var type in kvp.Value)
|
||||
{
|
||||
foreach (var method in type.GetMethods(bindingFlags))
|
||||
{
|
||||
var attributes = method.GetCustomAttributes<MenuItem>().ToList();
|
||||
if (attributes.Count == 0)
|
||||
continue;
|
||||
|
||||
var badAttributes = attributes.Where(x => !IsValidMenuItem(x.menuItem)).ToList();
|
||||
if (badAttributes.Count > 0)
|
||||
badMethods.Add($"{string.Join("\n", badAttributes.Select(x => $"\'{x.menuItem}\'"))}\n(for method '{method.Name}')\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (badMethods.Count > 0)
|
||||
affectedScripts.Add(kvp.Key, badMethods);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Precompiled Assemblies
|
||||
|
||||
var assemblies = AssetUtility.GetObjectsFromAssets(config.ValidationPaths, AssetType.PrecompiledAssembly).ToArray();
|
||||
var assemblyTypes = ScriptUtility.GetTypesFromAssemblies(assemblies);
|
||||
var affectedAssemblies = new Dictionary<UnityObject, List<string>>();
|
||||
|
||||
foreach (var kvp in assemblyTypes)
|
||||
{
|
||||
var badMethods = new List<string>();
|
||||
foreach (var type in kvp.Value)
|
||||
{
|
||||
foreach (var method in type.GetMethods(bindingFlags))
|
||||
{
|
||||
var attributes = method.GetCustomAttributes<MenuItem>().ToList();
|
||||
if (attributes.Count == 0)
|
||||
continue;
|
||||
|
||||
var badAttributes = attributes.Where(x => !IsValidMenuItem(x.menuItem)).ToList();
|
||||
if (badAttributes.Count > 0)
|
||||
badMethods.Add($"{string.Join("\n", badAttributes.Select(x => (x as MenuItem).menuItem))}\n(Method '{method.Name}')\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (badMethods.Count > 0)
|
||||
affectedAssemblies.Add(kvp.Key, badMethods);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (affectedScripts.Count > 0 || affectedAssemblies.Count > 0)
|
||||
{
|
||||
if (affectedScripts.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following scripts contain invalid MenuItem names:");
|
||||
foreach (var kvp in affectedScripts)
|
||||
{
|
||||
var message = string.Empty;
|
||||
foreach (var type in kvp.Value)
|
||||
message += type + "\n";
|
||||
|
||||
message = message.Remove(message.Length - "\n".Length);
|
||||
result.AddMessage(message, null, kvp.Key);
|
||||
}
|
||||
}
|
||||
|
||||
if (affectedAssemblies.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following assemblies contain invalid MenuItem names:");
|
||||
foreach (var kvp in affectedAssemblies)
|
||||
{
|
||||
var message = string.Empty;
|
||||
foreach (var type in kvp.Value)
|
||||
message += type + "\n";
|
||||
|
||||
message = message.Remove(message.Length - "\n".Length);
|
||||
result.AddMessage(message, null, kvp.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No MenuItems with invalid names were found!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool IsValidMenuItem(string menuItemName)
|
||||
{
|
||||
var acceptableMenuItems = new string[]
|
||||
{
|
||||
"File",
|
||||
"Edit",
|
||||
"Assets",
|
||||
"GameObject",
|
||||
"Component",
|
||||
"Window",
|
||||
"Help",
|
||||
"CONTEXT",
|
||||
"Tools"
|
||||
};
|
||||
|
||||
menuItemName = menuItemName.Replace("\\", "/");
|
||||
if (acceptableMenuItems.Any(x => menuItemName.ToLower().StartsWith($"{x.ToLower()}/")))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8e3b12ecc1fcd74d9a9f8d2b549fc63
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckFileMenuNames.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,69 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckLODs : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var prefabs = AssetUtility.GetObjectsFromAssets<GameObject>(config.ValidationPaths, AssetType.Prefab);
|
||||
var badPrefabs = new Dictionary<GameObject, List<MeshFilter>>();
|
||||
|
||||
foreach (var p in prefabs)
|
||||
{
|
||||
var meshFilters = p.GetComponentsInChildren<MeshFilter>(true);
|
||||
var badMeshFilters = new List<MeshFilter>();
|
||||
var lodGroups = p.GetComponentsInChildren<LODGroup>(true);
|
||||
|
||||
foreach (var mf in meshFilters)
|
||||
{
|
||||
if (mf.name.Contains("LOD") && !IsPartOfLodGroup(mf, lodGroups))
|
||||
badMeshFilters.Add(mf);
|
||||
}
|
||||
|
||||
if (badMeshFilters.Count > 0)
|
||||
badPrefabs.Add(p, badMeshFilters);
|
||||
}
|
||||
|
||||
if (badPrefabs.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("All found prefabs are meeting the LOD requirements!");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following prefabs do not meet the LOD requirements");
|
||||
|
||||
foreach (var p in badPrefabs)
|
||||
{
|
||||
var resultList = new List<Object>();
|
||||
resultList.Add(p.Key);
|
||||
resultList.AddRange(p.Value);
|
||||
result.AddMessage($"{p.Key.name}.prefab", new MessageActionOpenAsset(p.Key), resultList.ToArray());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool IsPartOfLodGroup(MeshFilter mf, LODGroup[] lodGroups)
|
||||
{
|
||||
foreach (var lodGroup in lodGroups)
|
||||
{
|
||||
// If MeshFilter is a child/deep child of a LodGroup AND is referenced in this LOD group - it is valid
|
||||
if (mf.transform.IsChildOf(lodGroup.transform) &&
|
||||
lodGroup.GetLODs().Any(lod => lod.renderers.Any(renderer => renderer != null && renderer.gameObject == mf.gameObject)))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43b2158602f87704fa7b91561cfc8678
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckLODs.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,68 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEditor;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckLineEndings : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var scripts = AssetUtility.GetObjectsFromAssets<MonoScript>(config.ValidationPaths, AssetType.MonoScript);
|
||||
|
||||
var affectedScripts = new ConcurrentBag<UnityObject>();
|
||||
var scriptContents = new ConcurrentDictionary<MonoScript, string>();
|
||||
|
||||
// A separate dictionary is needed because MonoScript contents cannot be accessed outside of the main thread
|
||||
foreach (var s in scripts)
|
||||
if (s != null)
|
||||
scriptContents.TryAdd(s, s.text);
|
||||
|
||||
Parallel.ForEach(scriptContents, (s) =>
|
||||
{
|
||||
if (HasInconsistentLineEndings(s.Value))
|
||||
affectedScripts.Add(s.Key);
|
||||
});
|
||||
|
||||
if (affectedScripts.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following scripts have inconsistent line endings:", null, affectedScripts.ToArray());
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No scripts with inconsistent line endings were found!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool HasInconsistentLineEndings(string text)
|
||||
{
|
||||
int crlfEndings = 0;
|
||||
int lfEndings = 0;
|
||||
|
||||
var split = text.Split(new[] { "\n" }, StringSplitOptions.None);
|
||||
for (int i = 0; i < split.Length; i++)
|
||||
{
|
||||
var line = split[i];
|
||||
if (line.EndsWith("\r"))
|
||||
crlfEndings++;
|
||||
else if (i != split.Length - 1)
|
||||
lfEndings++;
|
||||
}
|
||||
|
||||
if (crlfEndings > 0 && lfEndings > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85885005d1c594f42826de3555e98365
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckLineEndings.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,95 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckMeshPrefabs : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var usedModelPaths = new List<string>();
|
||||
var prefabs = AssetUtility.GetObjectsFromAssets<GameObject>(config.ValidationPaths, AssetType.Prefab);
|
||||
var missingMeshReferencePrefabs = new List<GameObject>();
|
||||
|
||||
// Get all meshes in existing prefabs and check if prefab has missing mesh references
|
||||
foreach (var p in prefabs)
|
||||
{
|
||||
var meshes = MeshUtility.GetCustomMeshesInObject(p);
|
||||
foreach (var mesh in meshes)
|
||||
{
|
||||
string meshPath = AssetUtility.ObjectToAssetPath(mesh);
|
||||
usedModelPaths.Add(meshPath);
|
||||
}
|
||||
|
||||
if (HasMissingMeshReferences(p))
|
||||
missingMeshReferencePrefabs.Add(p);
|
||||
}
|
||||
|
||||
// Get all meshes in existing models
|
||||
var allModelPaths = GetAllModelMeshPaths(config.ValidationPaths);
|
||||
|
||||
// Get the list of meshes without prefabs
|
||||
List<string> unusedModels = allModelPaths.Except(usedModelPaths).ToList();
|
||||
|
||||
if (unusedModels.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("All found prefabs have meshes!");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
var models = unusedModels.Select(AssetUtility.AssetPathToObject).ToArray();
|
||||
result.AddMessage("The following models do not have associated prefabs", null, models);
|
||||
|
||||
if (missingMeshReferencePrefabs.Count > 0)
|
||||
result.AddMessage("The following prefabs have missing mesh references", null, missingMeshReferencePrefabs.ToArray());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetAllModelMeshPaths(string[] validationPaths)
|
||||
{
|
||||
var models = AssetUtility.GetObjectsFromAssets(validationPaths, AssetType.Model);
|
||||
var paths = new List<string>();
|
||||
|
||||
foreach (var o in models)
|
||||
{
|
||||
var m = (GameObject)o;
|
||||
var modelPath = AssetUtility.ObjectToAssetPath(m);
|
||||
var assetImporter = AssetUtility.GetAssetImporter(modelPath);
|
||||
if (assetImporter is UnityEditor.ModelImporter modelImporter)
|
||||
{
|
||||
var clips = modelImporter.clipAnimations.Count();
|
||||
var meshes = MeshUtility.GetCustomMeshesInObject(m);
|
||||
|
||||
// Only add if the model has meshes and no clips
|
||||
if (meshes.Any() && clips == 0)
|
||||
paths.Add(modelPath);
|
||||
}
|
||||
}
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
private bool HasMissingMeshReferences(GameObject go)
|
||||
{
|
||||
var meshes = go.GetComponentsInChildren<MeshFilter>(true);
|
||||
var skinnedMeshes = go.GetComponentsInChildren<SkinnedMeshRenderer>(true);
|
||||
|
||||
if (meshes.Length == 0 && skinnedMeshes.Length == 0)
|
||||
return false;
|
||||
|
||||
if (meshes.Any(x => x.sharedMesh == null) || skinnedMeshes.Any(x => x.sharedMesh == null))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c3d0d642ac6a6a48aa124a93dae3734
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckMeshPrefabs.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,57 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckMissingComponentsinAssets : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var assets = GetAllAssetsWithMissingComponents(config.ValidationPaths);
|
||||
|
||||
if (assets.Length == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No assets have missing components!");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following assets contain missing components", null, assets);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private GameObject[] GetAllAssetsWithMissingComponents(string[] validationPaths)
|
||||
{
|
||||
var missingReferenceAssets = new List<GameObject>();
|
||||
var prefabObjects = AssetUtility.GetObjectsFromAssets<GameObject>(validationPaths, AssetType.Prefab);
|
||||
|
||||
foreach (var p in prefabObjects)
|
||||
{
|
||||
if (p != null && IsMissingReference(p))
|
||||
missingReferenceAssets.Add(p);
|
||||
}
|
||||
|
||||
return missingReferenceAssets.ToArray();
|
||||
}
|
||||
|
||||
private bool IsMissingReference(GameObject asset)
|
||||
{
|
||||
var components = asset.GetComponentsInChildren<Component>();
|
||||
|
||||
foreach (var c in components)
|
||||
{
|
||||
if (!c)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22d8f814e2363e34ea220736a4042728
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckMissingComponentsinAssets.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,81 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using SceneAsset = UnityEditor.SceneAsset;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckMissingComponentsinScenes : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var originalScenePath = SceneUtility.CurrentScenePath;
|
||||
|
||||
var scenePaths = AssetUtility.GetAssetPathsFromAssets(config.ValidationPaths, AssetType.Scene);
|
||||
foreach (var scenePath in scenePaths)
|
||||
{
|
||||
var missingComponentGOs = GetMissingComponentGOsInScene(scenePath);
|
||||
|
||||
if (missingComponentGOs.Count == 0)
|
||||
continue;
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
var message = $"GameObjects with missing components or prefab references found in {scenePath}.\n\nClick this message to open the Scene and see the affected GameObjects:";
|
||||
result.AddMessage(message, new MessageActionOpenAsset(AssetUtility.AssetPathToObject<SceneAsset>(scenePath)), missingComponentGOs.ToArray());
|
||||
}
|
||||
|
||||
SceneUtility.OpenScene(originalScenePath);
|
||||
|
||||
if (result.Result == TestResult.ResultStatus.Undefined)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No missing components were found!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<GameObject> GetMissingComponentGOsInScene(string path)
|
||||
{
|
||||
var missingComponentGOs = new List<GameObject>();
|
||||
|
||||
var scene = SceneUtility.OpenScene(path);
|
||||
|
||||
if (!scene.IsValid())
|
||||
{
|
||||
Debug.LogWarning("Unable to get Scene in " + path);
|
||||
return new List<GameObject>();
|
||||
}
|
||||
|
||||
var rootObjects = scene.GetRootGameObjects();
|
||||
|
||||
foreach (var obj in rootObjects)
|
||||
{
|
||||
missingComponentGOs.AddRange(GetMissingComponentGOs(obj));
|
||||
}
|
||||
|
||||
return missingComponentGOs;
|
||||
}
|
||||
|
||||
private List<GameObject> GetMissingComponentGOs(GameObject root)
|
||||
{
|
||||
var missingComponentGOs = new List<GameObject>();
|
||||
var rootComponents = root.GetComponents<Component>();
|
||||
|
||||
if (UnityEditor.PrefabUtility.GetPrefabInstanceStatus(root) == UnityEditor.PrefabInstanceStatus.MissingAsset || rootComponents.Any(c => !c))
|
||||
{
|
||||
missingComponentGOs.Add(root);
|
||||
}
|
||||
|
||||
foreach (Transform child in root.transform)
|
||||
missingComponentGOs.AddRange(GetMissingComponentGOs(child.gameObject));
|
||||
|
||||
return missingComponentGOs;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 511e76d0ebcb23d40a7b49dda0e2980f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckMissingComponentsinScenes.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,53 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckModelImportLogs : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var models = AssetUtility.GetObjectsFromAssets<UnityObject>(config.ValidationPaths, AssetType.Model);
|
||||
var importLogs = ModelUtility.GetImportLogs(models.ToArray());
|
||||
|
||||
var warningModels = new List<UnityObject>();
|
||||
var errorModels = new List<UnityObject>();
|
||||
|
||||
foreach (var kvp in importLogs)
|
||||
{
|
||||
if (kvp.Value.Any(x => x.Severity == UnityEngine.LogType.Error))
|
||||
errorModels.Add(kvp.Key);
|
||||
if (kvp.Value.Any(x => x.Severity == UnityEngine.LogType.Warning))
|
||||
warningModels.Add(kvp.Key);
|
||||
}
|
||||
|
||||
if (warningModels.Count > 0 || errorModels.Count > 0)
|
||||
{
|
||||
if (warningModels.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following models contain import warnings:", null, warningModels.ToArray());
|
||||
}
|
||||
|
||||
if (errorModels.Count > 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Fail;
|
||||
result.AddMessage("The following models contain import errors:", null, errorModels.ToArray());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("No issues were detected when importing your models!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98f3ec209166855408eaf4abe5bff591
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckModelImportLogs.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,60 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckModelOrientation : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var models = AssetUtility.GetObjectsFromAssets<GameObject>(config.ValidationPaths, AssetType.Model);
|
||||
var badModels = new List<GameObject>();
|
||||
|
||||
foreach (var m in models)
|
||||
{
|
||||
var meshes = MeshUtility.GetCustomMeshesInObject(m);
|
||||
var assetImporter = AssetUtility.GetAssetImporter(m);
|
||||
|
||||
if (!(assetImporter is UnityEditor.ModelImporter modelImporter))
|
||||
continue;
|
||||
|
||||
var clips = modelImporter.clipAnimations.Length;
|
||||
|
||||
// Only check if the model has meshes and no clips
|
||||
if (!meshes.Any() || clips != 0)
|
||||
continue;
|
||||
|
||||
Transform[] transforms = m.GetComponentsInChildren<Transform>(true);
|
||||
|
||||
foreach (var t in transforms)
|
||||
{
|
||||
var hasMeshComponent = t.TryGetComponent<MeshFilter>(out _) || t.TryGetComponent<SkinnedMeshRenderer>(out _);
|
||||
|
||||
if (t.localRotation == Quaternion.identity || !hasMeshComponent)
|
||||
continue;
|
||||
|
||||
badModels.Add(m);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (badModels.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("All found models are facing the right way!");
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following models have incorrect rotation", null, badModels.ToArray());
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56cdcdc41a80fbc46b5b2b83ec8d66d7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckModelOrientation.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,49 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckModelTypes : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var allowedExtensions = new string[] { ".fbx", ".dae", ".abc", ".obj" };
|
||||
// Should retrieve All assets and not models here since ADB will not recognize certain
|
||||
// types if appropriate software is not installed (e.g. .blend without Blender)
|
||||
var allAssetPaths = AssetUtility.GetAssetPathsFromAssets(config.ValidationPaths, AssetType.All);
|
||||
var badModels = new List<UnityObject>();
|
||||
|
||||
foreach (var assetPath in allAssetPaths)
|
||||
{
|
||||
var importer = AssetUtility.GetAssetImporter(assetPath);
|
||||
if (importer == null || !(importer is ModelImporter))
|
||||
continue;
|
||||
|
||||
if (allowedExtensions.Any(x => importer.assetPath.ToLower().EndsWith(x)))
|
||||
continue;
|
||||
|
||||
badModels.Add(AssetUtility.AssetPathToObject(assetPath));
|
||||
}
|
||||
|
||||
if (badModels.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("All models are of allowed formats!");
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following models are of formats that should not be used for Asset Store packages:", null, badModels.ToArray());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 428b1fb838e6f5a469bbfd26ca3fbfd2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckModelTypes.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,86 @@
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckNormalMapTextures : ITestScript
|
||||
{
|
||||
public const int TextureCacheLimit = 8;
|
||||
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var materials = AssetUtility.GetObjectsFromAssets<Material>(config.ValidationPaths, AssetType.Material);
|
||||
var badTextures = new List<Texture>();
|
||||
var badPaths = new List<string>();
|
||||
|
||||
foreach (var mat in materials)
|
||||
{
|
||||
for (int i = 0; i < mat.shader.GetPropertyCount(); i++)
|
||||
{
|
||||
if ((mat.shader.GetPropertyFlags(i) & UnityEngine.Rendering.ShaderPropertyFlags.Normal) != 0)
|
||||
{
|
||||
var propertyName = mat.shader.GetPropertyName(i);
|
||||
var assignedTexture = mat.GetTexture(propertyName);
|
||||
|
||||
if (assignedTexture == null)
|
||||
continue;
|
||||
|
||||
var texturePath = AssetUtility.ObjectToAssetPath(assignedTexture);
|
||||
var textureImporter = AssetUtility.GetAssetImporter(texturePath) as TextureImporter;
|
||||
if (textureImporter == null)
|
||||
continue;
|
||||
|
||||
if (textureImporter.textureType != TextureImporterType.NormalMap && !badTextures.Contains(assignedTexture))
|
||||
{
|
||||
if (badTextures.Count < TextureCacheLimit)
|
||||
{
|
||||
badTextures.Add(assignedTexture);
|
||||
}
|
||||
else
|
||||
{
|
||||
string path = AssetDatabase.GetAssetPath(assignedTexture);
|
||||
badPaths.Add(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorUtility.UnloadUnusedAssetsImmediate();
|
||||
}
|
||||
|
||||
if (badTextures.Count == 0)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("All normal map textures have the correct texture type!");
|
||||
}
|
||||
else if(badPaths.Count != 0)
|
||||
{
|
||||
foreach (Texture texture in badTextures)
|
||||
{
|
||||
string path = AssetDatabase.GetAssetPath(texture);
|
||||
badPaths.Add(path);
|
||||
}
|
||||
|
||||
string paths = string.Join("\n", badPaths);
|
||||
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following textures are not set to type 'Normal Map'", null);
|
||||
result.AddMessage(paths);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.VariableSeverityIssue;
|
||||
result.AddMessage("The following textures are not set to type 'Normal Map'", null, badTextures.ToArray());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d55cea510248f814eb2194c2b53f88d2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 115
|
||||
packageName: Asset Store Publishing Tools
|
||||
packageVersion: 11.4.3
|
||||
assetPath: Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Tests/Test
|
||||
Methods/CheckNormalMapTextures.cs
|
||||
uploadId: 681981
|
||||
@@ -0,0 +1,65 @@
|
||||
using AssetStoreTools.Uploader;
|
||||
using AssetStoreTools.Validator.Data;
|
||||
using AssetStoreTools.Validator.TestDefinitions;
|
||||
using AssetStoreTools.Validator.TestMethods.Utility;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace AssetStoreTools.Validator.TestMethods
|
||||
{
|
||||
internal class CheckPackageSize : ITestScript
|
||||
{
|
||||
public TestResult Run(ValidationTestConfig config)
|
||||
{
|
||||
var result = new TestResult() { Result = TestResult.ResultStatus.Undefined };
|
||||
|
||||
var packageSize = CalculatePackageSize(config.ValidationPaths);
|
||||
float packageSizeInGB = packageSize / (1024f * 1024f * 1024f);
|
||||
float maxPackageSizeInGB = AssetStoreUploader.MaxPackageSizeBytes / (1024f * 1024f * 1024f);
|
||||
|
||||
if (packageSizeInGB - maxPackageSizeInGB >= 0.1f)
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Warning;
|
||||
|
||||
result.AddMessage($"The uncompressed size of your package ({packageSizeInGB:0.#} GB) exceeds the maximum allowed package size of {maxPackageSizeInGB:0.#} GB. " +
|
||||
$"Please make sure that the compressed .unitypackage size does not exceed the size limit.");
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Result = TestResult.ResultStatus.Pass;
|
||||
result.AddMessage("Your package does not exceed the maximum allowed package size!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private long CalculatePackageSize(string[] assetPaths)
|
||||
{
|
||||
long totalSize = 0;
|
||||
|
||||
foreach(var path in assetPaths)
|
||||
{
|
||||
totalSize += CalculatePathSize(path);
|
||||
}
|
||||
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
private long CalculatePathSize(string path)
|
||||
{
|
||||
long size = 0;
|
||||
|
||||
var dirInfo = new DirectoryInfo(path);
|
||||
if (!dirInfo.Exists)
|
||||
return size;
|
||||
|
||||
foreach (var file in dirInfo.EnumerateFiles())
|
||||
size += file.Length;
|
||||
|
||||
foreach (var nestedDir in dirInfo.EnumerateDirectories())
|
||||
size += CalculatePathSize(nestedDir.FullName);
|
||||
|
||||
return size;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user