Andrem
3 年前
当前提交
e2799f41
共有 14 个文件被更改,包括 2748 次插入 和 574 次删除
-
1Assets/Objects/misc/Main Camera.prefab
-
988Assets/ReferenceImages/Linear/OSXEditor/Metal/None/benchmark_island-static.png
-
2Assets/ReferenceImages/Linear/OSXEditor/Metal/None/benchmark_island-static.png.meta
-
2Assets/Scripts/Environment/WindsurferManager.cs
-
12Assets/Scripts/GameSystem/AppSettings.cs
-
20Assets/Scripts/GameSystem/InputControls.cs
-
67Assets/Scripts/System/UnityGFXTests/BoatAttackGraphicsTests.cs
-
19Assets/Scripts/Utility/Utility.cs
-
2Packages/com.verasl.water-system/Scripts/Water.cs
-
15Packages/manifest.json
-
1001Assets/ReferenceImages/Linear/OSXEditor/Metal/None/level_Island.png
-
96Assets/ReferenceImages/Linear/OSXEditor/Metal/None/level_Island.png.meta
-
1001Assets/ReferenceImages/Linear/OSXEditor/Metal/None/main_menu.png
-
96Assets/ReferenceImages/Linear/OSXEditor/Metal/None/main_menu.png.meta
988
Assets/ReferenceImages/Linear/OSXEditor/Metal/None/benchmark_island-static.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System.Collections; |
|||
using NUnit.Framework; |
|||
using UnityEditor.Compilation; |
|||
using UnityEngine; |
|||
using UnityEngine.TestTools; |
|||
using UnityEngine.TestTools.Graphics; |
|||
using UnityEngine.SceneManagement; |
|||
using UnityEngine; |
|||
using UnityEngine.TestTools; |
|||
using UnityEngine.TestTools.Graphics; |
|||
using UnityEngine.SceneManagement; |
|||
const string defineKey = "BoatAttackKey"; |
|||
private const string DefineKey = "BoatAttack_Tests_ScriptingDefines"; |
|||
private static float _oldTimeScale = 1.0f; // give default of 1 just in case
|
|||
// save current scription defines and set both STATIC_EVERYTHING and LWRP_DEBUG_STATIC_POSTFX
|
|||
EditorPrefs.SetString(defineKey, defines); |
|||
EditorPrefs.SetString(DefineKey, defines); |
|||
// store current timescale and set it to 0
|
|||
_oldTimeScale = Time.timeScale; |
|||
Time.timeScale = 0f; |
|||
// run base graphics test setup
|
|||
|
|||
//[PrebuildSetup("SetupGraphicsTestCases")]
|
|||
|
|||
|
|||
var ts = Time.timeScale; |
|||
|
|||
// set time scale again just in case game have changed it
|
|||
// set the static keyword
|
|||
Shader.EnableKeyword("_STATIC_SHADER"); |
|||
// grab the main camera
|
|||
// add graphics settings if does not exist in the scene
|
|||
settings = SetTestSettings(settings); |
|||
|
|||
for (var i = 0; i < settings.WaitFrames; i++) |
|||
yield return new WaitForEndOfFrame(); |
|||
|
|||
ImageAssert.AreEqual(testCase.ReferenceImage, camera, settings.ImageComparisonSettings); |
|||
} |
|||
|
|||
private static BoatAttackGraphicsTestsSettings SetTestSettings(BoatAttackGraphicsTestsSettings settings) |
|||
{ |
|||
settings.ImageComparisonSettings.IncorrectPixelsThreshold = 0.001f; |
|||
settings.ImageComparisonSettings.IncorrectPixelsThreshold = 0.01f; |
|||
|
|||
|
|||
#if STATIC_EVERYTHING
|
|||
Debug.Log("hello, this worked"); |
|||
#endif
|
|||
|
|||
for (int i = 0; i < settings.WaitFrames; i++) |
|||
yield return new WaitForEndOfFrame(); |
|||
|
|||
ImageAssert.AreEqual(testCase.ReferenceImage, camera, settings.ImageComparisonSettings); |
|||
|
|||
Time.timeScale = ts; |
|||
return settings; |
|||
|
|||
UnityEditor.TestTools.Graphics.ResultsUtility.ExtractImagesFromTestProperties(TestContext.CurrentContext.Test); |
|||
ResultsUtility.ExtractImagesFromTestProperties(TestContext.CurrentContext.Test); |
|||
EditorApplication.delayCall += Call; |
|||
EditorApplication.delayCall += FinalCall; |
|||
Time.timeScale = _oldTimeScale; |
|||
Shader.DisableKeyword("_STATIC_SHADER"); |
|||
static void Call() |
|||
private static void FinalCall() |
|||
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, EditorPrefs.GetString(defineKey)); |
|||
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, EditorPrefs.GetString(DefineKey)); |
|||
EditorPrefs.DeleteKey(DefineKey); |
|||
} |
|||
} |
1001
Assets/ReferenceImages/Linear/OSXEditor/Metal/None/level_Island.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 5cd214bf7e19c4f83914139575476803 |
|||
TextureImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 11 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 1 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
vTOnly: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: 1 |
|||
aniso: 1 |
|||
mipBias: 0 |
|||
wrapU: 0 |
|||
wrapV: 0 |
|||
wrapW: 0 |
|||
nPOTScale: 0 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
flipbookRows: 1 |
|||
flipbookColumns: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
ignorePngGamma: 0 |
|||
applyGammaDecoding: 0 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 0 |
|||
compressionQuality: 0 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
internalID: 0 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
secondaryTextures: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/ReferenceImages/Linear/OSXEditor/Metal/None/main_menu.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 8596ae1d516a74e09bba709f583564bd |
|||
TextureImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 11 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 1 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
vTOnly: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: 1 |
|||
aniso: 1 |
|||
mipBias: 0 |
|||
wrapU: 0 |
|||
wrapV: 0 |
|||
wrapW: 0 |
|||
nPOTScale: 0 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
flipbookRows: 1 |
|||
flipbookColumns: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
ignorePngGamma: 0 |
|||
applyGammaDecoding: 0 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 0 |
|||
compressionQuality: 0 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
internalID: 0 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
secondaryTextures: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue