mirror of
https://github.com/nothke/quality-control.git
synced 2024-12-22 15:57:28 +00:00
Added texture preprocessor to enforce no filtering
This commit is contained in:
parent
f20994a8db
commit
63747c7f7f
8
Assets/Scripts/Editor.meta
Normal file
8
Assets/Scripts/Editor.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 51fc89590d392e4458728c087b430687
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
12
Assets/Scripts/Editor/TexturePreprocessor.cs
Normal file
12
Assets/Scripts/Editor/TexturePreprocessor.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
|
class TexturePreprocessor : AssetPostprocessor
|
||||||
|
{
|
||||||
|
void OnPreprocessTexture()
|
||||||
|
{
|
||||||
|
// if (assetPath.Contains("_bumpmap"))
|
||||||
|
TextureImporter textureImporter = (TextureImporter)assetImporter;
|
||||||
|
textureImporter.filterMode = FilterMode.Point;
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/Editor/TexturePreprocessor.cs.meta
Normal file
11
Assets/Scripts/Editor/TexturePreprocessor.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d33006e1540e5a649b300c3c7954e1f3
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -37,8 +37,8 @@ public class WeightDetector : MonoBehaviour
|
|||||||
return totalMass;
|
return totalMass;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
//private void Update()
|
||||||
{
|
//{
|
||||||
Debug.Log(GetTotalWeight());
|
// Debug.Log(GetTotalWeight());
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ TextureImporter:
|
|||||||
maxTextureSize: 2048
|
maxTextureSize: 2048
|
||||||
textureSettings:
|
textureSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
filterMode: 1
|
filterMode: 0
|
||||||
aniso: 1
|
aniso: 1
|
||||||
mipBias: 0
|
mipBias: 0
|
||||||
wrapU: 0
|
wrapU: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user