Skip to content

Commit

Permalink
chore(meshinfo2): remove read write mesh off warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Sep 18, 2024
1 parent 427c28b commit 0565db7
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 58 deletions.
34 changes: 0 additions & 34 deletions Internal/MeshInfo2/MeshInfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,6 @@ public MeshInfo2(SkinnedMeshRenderer renderer)
{
SourceRenderer = renderer;
var mesh = _originalMesh = renderer.sharedMesh;
if (mesh != null && mesh.vertexCount != 0 && mesh.vertices.Length == 0)
{
var originalMeshImporter = GetImporter(ObjectRegistry.GetReference(mesh).Object as Mesh);

ModelImporter? GetImporter(Mesh? importingMesh)
{
if (!importingMesh) return null;
var path = AssetDatabase.GetAssetPath(importingMesh);
if (string.IsNullOrEmpty(path)) return null;
return AssetImporter.GetAtPath(path) as ModelImporter;
}

if (originalMeshImporter == null)
{
BuildLog.LogError("MeshInfo2:error:MeshNotReadable", mesh);
}
else
{
void AutoFix()
{
originalMeshImporter.isReadable = true;
originalMeshImporter.SaveAndReimport();
}

BuildLog.LogErrorWithAutoFix("MeshInfo2:error:MeshNotReadable", AutoFix, mesh);
}

return;
}

using (ErrorReport.WithContextObject(renderer))
{
Expand Down Expand Up @@ -109,11 +80,6 @@ public MeshInfo2(MeshRenderer renderer)
{
var meshFilter = renderer.GetComponent<MeshFilter>();
var mesh = _originalMesh = meshFilter != null ? meshFilter.sharedMesh : null;
if (mesh != null && !mesh.isReadable && EditorApplication.isPlaying)
{
BuildLog.LogError("MeshInfo2:error:MeshNotReadable", mesh);
return;
}
if (mesh != null)
ReadStaticMesh(mesh);

Expand Down
6 changes: 0 additions & 6 deletions Localization/en-us.po
Original file line number Diff line number Diff line change
Expand Up @@ -764,12 +764,6 @@ msgstr "Animator component not found on Avatar Root"

#region MeshInfo2

msgid "MeshInfo2:error:MeshNotReadable"
msgstr "The Mesh is not readable so unable to process mesh in Play Mode."

msgid "MeshInfo2:error:MeshNotReadable:description"
msgstr "Please set Read/Write Enabled to true in the import settings of the mesh."

msgid "MeshInfo2:warning:multiPassRendering"
msgstr ""
"Multi pass rendering with multiple materials is used in mesh with '{0}' Component.\n"
Expand Down
6 changes: 0 additions & 6 deletions Localization/ja-jp.po
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,6 @@ msgstr "アバターのルートにAnimatorコンポーネントがありませ

#region MeshInfo2

msgid "MeshInfo2:error:MeshNotReadable"
msgstr "メッシュが読み取り可能になっていないため、Play Modeでのメッシュの処理ができません。"

msgid "MeshInfo2:error:MeshNotReadable:description"
msgstr "メッシュのインポート設定でRead/Write Enabledをtrueに設定してください。"

msgid "MeshInfo2:warning:multiPassRendering"
msgstr ""
"'{0}'コンポーネントを使用しているメッシュにおいて、複数マテリアルによるマルチパスレンダリングが使用されています。\n"
Expand Down
6 changes: 0 additions & 6 deletions Localization/zh-cn.po
Original file line number Diff line number Diff line change
Expand Up @@ -650,12 +650,6 @@ msgstr "在模型的根对象下没有找到Animator组件。"

#region MeshInfo2

msgid "MeshInfo2:error:MeshNotReadable"
msgstr "由于网格不可读,无法在播放模式中处理网格。"

msgid "MeshInfo2:error:MeshNotReadable:description"
msgstr "请在网格的导入设置中将 Read/Write (读取/写入) 设置为true。"

msgid "MeshInfo2:warning:multiPassRendering"
msgstr ""
"在使用'{0}'组件的网格中,使用了多个材质进行多通道渲染。\n"
Expand Down
6 changes: 0 additions & 6 deletions Localization/zh-hant.po
Original file line number Diff line number Diff line change
Expand Up @@ -692,12 +692,6 @@ msgstr "在 Avatar 的根上找不到 Animator 元件"

#region MeshInfo2

msgid "MeshInfo2:error:MeshNotReadable"
msgstr "這個網格是不可讀的,因此無法在播放模式中處理網格。"

msgid "MeshInfo2:error:MeshNotReadable:description"
msgstr "請在網格的匯入設定中啟用「讀取/寫入」或「Read/Write」。"

msgid "MeshInfo2:warning:multiPassRendering"
msgstr ""
"在帶有「{0}」元件的網格中使用了多材質的多通道渲染。\n"
Expand Down

0 comments on commit 0565db7

Please sign in to comment.