战斗资源
This commit is contained in:
parent
db8b4c583e
commit
91980574ea
@ -17,7 +17,8 @@ namespace BFEditor.Resource
|
|||||||
new MainSpriteChecker(),
|
new MainSpriteChecker(),
|
||||||
// new LanguageSpriteChecker(),
|
// new LanguageSpriteChecker(),
|
||||||
new BackgroundChecker(),
|
new BackgroundChecker(),
|
||||||
new CharacterTextureChecker(),
|
new BattleBackgroundChecker(),
|
||||||
|
// new CharacterTextureChecker(),
|
||||||
new EffectTextureChecker(),
|
new EffectTextureChecker(),
|
||||||
new SpineTextureChecker(),
|
new SpineTextureChecker(),
|
||||||
// new FrameTextureChecker(),
|
// new FrameTextureChecker(),
|
||||||
|
|||||||
@ -40,7 +40,16 @@ namespace BFEditor.Resource
|
|||||||
|
|
||||||
protected override List<string> GetAssetPathList()
|
protected override List<string> GetAssetPathList()
|
||||||
{
|
{
|
||||||
return BFEditorUtils.GetAssetPathsWithSuffix(ResourceProcessConfig.BG_TEXTURE_FOLDER_PATH, ".png");
|
var list = BFEditorUtils.GetAssetPathsWithSuffix(ResourceProcessConfig.BG_TEXTURE_FOLDER_PATH, ".png");
|
||||||
|
var count = list.Count;
|
||||||
|
for (int i = count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (list[i].Contains(ResourceProcessConfig.BG_BATTLE_TEXTURE_FOLDER_PATH))
|
||||||
|
{
|
||||||
|
list.RemoveAt(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,46 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace BFEditor.Resource
|
||||||
|
{
|
||||||
|
public class BattleBackgroundChecker : TextureSubCheckerBase
|
||||||
|
{
|
||||||
|
public override string InitName()
|
||||||
|
{
|
||||||
|
return "战斗背景大图";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool DoCheck(string assetPath, TextureImporter textureImporter, Object assetObj)
|
||||||
|
{
|
||||||
|
var result = true;
|
||||||
|
if (textureImporter.textureType != TextureImporterType.Default)
|
||||||
|
{
|
||||||
|
currentBadRes.AddBadLog("textureType异常");
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
if (textureImporter.npotScale != TextureImporterNPOTScale.ToNearest)
|
||||||
|
{
|
||||||
|
currentBadRes.AddBadLog("npotScale异常");
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
if (textureImporter.mipmapEnabled)
|
||||||
|
{
|
||||||
|
currentBadRes.AddBadLog("mipmapEnable异常");
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
if (textureImporter.wrapMode != TextureWrapMode.Repeat)
|
||||||
|
{
|
||||||
|
currentBadRes.AddBadLog("wrapMode异常");
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override List<string> GetAssetPathList()
|
||||||
|
{
|
||||||
|
return BFEditorUtils.GetAssetPathsWithSuffix(ResourceProcessConfig.BG_BATTLE_TEXTURE_FOLDER_PATH, ".png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d05bbba879b7eca4a96b157bbe898604
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -15,6 +15,7 @@ namespace BFEditor.Resource
|
|||||||
new MainSpriteImpoter(),
|
new MainSpriteImpoter(),
|
||||||
new LanguageSpriteImporter(),
|
new LanguageSpriteImporter(),
|
||||||
new BackgroundImpoter(),
|
new BackgroundImpoter(),
|
||||||
|
new BattleBgTextureImporter(),
|
||||||
new CharacterTextureImpoter(),
|
new CharacterTextureImpoter(),
|
||||||
new EffectTextureImpoter(),
|
new EffectTextureImpoter(),
|
||||||
new SpineTextureImporter(),
|
new SpineTextureImporter(),
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace BFEditor.Resource
|
||||||
|
{
|
||||||
|
public class BattleBgTextureImporter : TextureSubImporterBase
|
||||||
|
{
|
||||||
|
public override bool NeedDeal(string assetPath)
|
||||||
|
{
|
||||||
|
return assetPath.Contains(ResourceProcessConfig.BG_TEXTURE_FOLDER_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void DoImport(string assetPath, TextureImporter textureImporter, bool isFix)
|
||||||
|
{
|
||||||
|
textureImporter.textureType = TextureImporterType.Default;
|
||||||
|
textureImporter.npotScale = TextureImporterNPOTScale.ToNearest;
|
||||||
|
textureImporter.mipmapEnabled = false;
|
||||||
|
textureImporter.wrapMode = TextureWrapMode.Repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7cd18975f58a34d4696715fa61ab4c37
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -55,6 +55,8 @@ namespace BFEditor.Resource
|
|||||||
|
|
||||||
//背景大图文件夹路径
|
//背景大图文件夹路径
|
||||||
public const string BG_TEXTURE_FOLDER_PATH = "Assets/arts/textures/background";
|
public const string BG_TEXTURE_FOLDER_PATH = "Assets/arts/textures/background";
|
||||||
|
//战斗背景大图文件夹路径
|
||||||
|
public const string BG_BATTLE_TEXTURE_FOLDER_PATH = "Assets/arts/textures/background/battle/";
|
||||||
|
|
||||||
//ui图集文件夹
|
//ui图集文件夹
|
||||||
public const string UI_SPRITE_FOLDER_PATH = "Assets/arts/textures/ui";
|
public const string UI_SPRITE_FOLDER_PATH = "Assets/arts/textures/ui";
|
||||||
|
|||||||
@ -4877,6 +4877,10 @@ MonoBehaviour:
|
|||||||
hashName: 4261114232
|
hashName: 4261114232
|
||||||
objectType: 1
|
objectType: 1
|
||||||
gameObject: {fileID: 6456457455187257617}
|
gameObject: {fileID: 6456457455187257617}
|
||||||
|
- name: battle_ui.bg
|
||||||
|
hashName: 2542042008
|
||||||
|
objectType: 0
|
||||||
|
gameObject: {fileID: 463079035279260010}
|
||||||
--- !u!114 &305814484176852896
|
--- !u!114 &305814484176852896
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user