gamebuildingblocks / unitycomponent Goto Github PK
View Code? Open in Web Editor NEWUnity Resource Component
License: MIT License
Unity Resource Component
License: MIT License
public void AddObject(AnimationInfo textureInfo) {
TotalCount = TotalCount + 1;
TotalMemuse = TotalMemuse + textureInfo.MemSize;
m_objects.Add(textureInfo);
if (m_initUnFormatList && IsFormatAnimation(textureInfo)) {
m_unFortmatObjects.Add(textureInfo);
}
}
ImportData派生类的AddObject方法IsFormatXXX判断有误,应为!IsFormatXXX
这比较重要啊
在现有项目使用该工具,除了使用过滤器查看非法格式资源以外,希望在全资源表内引入颜色标识。
我个人在ImportData新增判断
public bool IsUnformat(object o)
{
return m_unFortmatObjects.Contains(o);
}
分别在TextureViewer, AnimationViewer,ModelViewer新增如下判断
GUIStyle errorStyle = null;
GUIStyle GetColor(object obj, GUIStyle c)
{
if (m_control.SelectData.IsUnformat(obj))
{
if (errorStyle == null)
{
errorStyle = new GUIStyle(c);
errorStyle.normal.textColor = Color.red;
}
return errorStyle;
}
return c;
}
并于TableView_Impl.cs 插入代码用来检查颜色
private void DrawLine(int pos, object obj, float width)
{
/*...*/
if (mGetCustomGUIStyle != null)//改变style
style = mGetCustomGUIStyle(obj,style);
for (int i = 0; i < m_descArray.Count; i++)
DrawLineCol(pos, i, width, obj, style, selectionHappens);
}
恩,我们美术有时会错误设置纹理类型(normal map用了UI Sprite之类的)心累,现在工具是没有办法过滤的,因为IsMatch会跳过textureType不同的资源。
提示 Empty Shader Bundle Shader_0
[BundleAdapter] BuildShaderBundle Shader_0 Failed.
使用的是 unity 内置的 shader
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.