-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EditorTextureSerializer で例外になるテクスチャを事前にエラーメッセージにする #1102
Conversation
{ | ||
case TextureImporterType.Default: | ||
case TextureImporterType.NormalMap: | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EditorTextureSerializer はこの2種類しか対応していない
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editor の話
{ | ||
public virtual string GetGltfMaterialTypeFromUnityShaderName(string shaderName) | ||
{ | ||
if (shaderName == "Standard") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この辺の判定は将来的に変わりそう
using UnityEngine; | ||
|
||
namespace UniGLTF | ||
{ | ||
public interface IMaterialValidator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いまはこれでいいですが、このインタフェースは Validator
だけの概念ではなく Exporter が参照すべきではありそう。
switch (textureImporter.textureType) | ||
{ | ||
case TextureImporterType.Default: | ||
case TextureImporterType.NormalMap: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exporter と Validator で2重に定義を持っていていいのかという感じはありますが、まあ Validator が厳しい分にはいいか…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Validator(ExportDialog) と Exporter で同じ処理を共通化する
Exporter がテクスチャー列挙という形式をとらずに全部展開してするという手法を取っているため、それほど共通化されない。
あまりきれいにならず。 IMaterialValidator と IMaterialExporter は合体でいいかも。 |
というのが良かったか。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime の挙動や public な interface に変更はなさそう ✔️
Prepare, Validate, Export はたしかによさそう |
#1100