Giter Site home page Giter Site logo

egret3d-unityplugin's People

Contributors

akdcl avatar quietrain avatar wuliao2230 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

egret3d-unityplugin's Issues

Unity的Asset Store里的"Unity-Chan!" Model导出后加载报错

没做任何调整,导出资源里的unitychan.prefab
Unity版本:Unity 5.6.7f1 (64-bit)
导出插件:master分支和1.2.0

spector.bundle.js:1 TypeError: Cannot read property 'name' of undefined
    at SkinnedMeshRenderer.initialize (egret3d.js:20324)
    at SkinnedMeshRendererSystem.onEntityAdded (egret3d.js:20633)
    at SystemManager._reactive (egret3d.js:6728)
    at SystemManager._execute (egret3d.js:6760)
    at ECS._update (egret3d.js:27240)
    at ECS._loop (egret3d.js:27225)
    at spector.bundle.js:1 []

具体原因是 SkinnedMeshRenderer里的skins中的skeleton和joints都是-1

场景导出失败问题

unity版本:2018.2.13f1
失败报错:
Assets/Scenes/SampleScene : 导出失败----------- at Egret3DExportTools.ResourceManager.SaveTextureEditor (UnityEngine.Texture2D tex, System.String matPath) [0x000fa] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\Helper\NodeParser\ResourceManager.cs:502
at Egret3DExportTools.ResourceManager.SaveTexture (UnityEngine.Texture2D tex, System.String matPath) [0x0001e] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\Helper\NodeParser\ResourceManager.cs:467
at PaperGLTF.MaterialWriter.WriteGLTF () [0x0051a] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\GLTF\PaperGLTF\Exporters\GLTFMaterialWriter.cs:313
at Egret3DExportTools.ResourceManager.SaveMat (UnityEngine.Material mat, Boolean isParticle, Boolean isAnimation) [0x0009b] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\Helper\NodeParser\ResourceManager.cs:320
at Egret3DExportTools.MyJosnExtension.SetMaterials (Egret3DExportTools.MyJson_Object pItem, UnityEngine.GameObject obj, UnityEngine.Material[] materials, Boolean isParticleMat, Boolean isAnimationMat) [0x0005f] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\Helper\Extensions\MyJosnExtension.cs:197
at Egret3DExportTools.MeshRendererParser.WriteToJson (UnityEngine.GameObject obj, UnityEngine.Component component) [0x0005a] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\ComponentParser\MeshRendererParser.cs:37
at Egret3DExportTools.SerializeObject.Serialized (UnityEngine.GameObject obj, System.String compClass, UnityEngine.Component comp) [0x00001] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\ComponentParser\Interface\SerializeObject.cs:82
at Egret3DExportTools.NodeParser.Serialize (UnityEngine.GameObject obj) [0x00212] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\Helper\NodeParser\NodeParser.cs:163
at Egret3DExportTools.NodeParser.SaveScene (System.String sceneName, UnityEngine.GameObject[] roots, System.String exportPath) [0x0004e] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\Helper\NodeParser\NodeParser.cs:90
at Egret3DExportTools.ExportSceneTools.SaveScene (System.String sceneName, UnityEngine.GameObject[] roots, System.String exportPath) [0x00001] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\ExportTools\ExportSceneTools.cs:80
at Egret3DExportTools.ExportSceneTools.ExportScene (System.String sceneName, System.String exportPath) [0x00013] in E:\Work\Egret\unity-plugin-export\UnityExportTool\src\ExportTools\ExportSceneTools.cs:62
UnityEngine.Debug:LogError(Object)
Egret3DExportTools.MyLog:LogError(Object) (at E:/Work/Egret/unity-plugin-export/UnityExportTool/src/Helper/MyLog.cs:25)
Egret3DExportTools.ExportSceneTools:ExportScene(String, String) (at E:/Work/Egret/unity-plugin-export/UnityExportTool/src/ExportTools/ExportSceneTools.cs:66)
Egret3DExportTools.ExportToolsWindow:ExportCurScene() (at E:/Work/Egret/unity-plugin-export/UnityExportTool/src/ExportTools/ExportToolsWindow.cs:228)
Egret3DExportTools.ExportToolsWindow:Update() (at E:/Work/Egret/unity-plugin-export/UnityExportTool/src/ExportTools/ExportToolsWindow.cs:190)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

关于导出场景失败

unity版本5.6.6、2017.3.1
导出场景时会提示失败,自己无法定位确切原因:(

Assets/hello : 导出失败----------- at System.Diagnostics.Process.Start_shell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in :0

支持 Unity2017 导出

  • Texture2D.EncodeToPNG这个API 在 Unity 2017 中已被删除,需使用 ImageConversion.EncodeToPNG 代替

一些建议

  • ExrToPngTools里 UnityEngine.Debug.LogError("**路劲**=>" + inputPath + "  包含空格,请检查");
  • png格式alpha和color是耦合的(Alpha为0的地方, 可能会改你的原始颜色值),如果用来存其他数据(譬如AO)会有问题,建议考虑导出GLTF时候用TGA
  • ImageHelper里写麻烦了,因为设置importer setting导入比较慢-。-可以用别的绕开
    var tex2 = new Texture2D(width, height, tex.format, false); Graphics.CopyTexture(tex, tex2);

资源导出失败

Egret3DExportTools.NodeParser.Serialize (UnityEngine.GameObject obj)
Egret3DExportTools.NodeParser.Serialize (UnityEngine.GameObject obj)
Egret3DExportTools.NodeParser.SaveNode (UnityEngine.GameObject obj)
Egret3DExportTools.ExportPrefabTools.SaveItem (UnityEngine.GameObject obj, System.String exportPath)
Egret3DExportTools.ExportPrefabTools.ExportPrefab (UnityEngine.GameObject curObj, System.String exportPath)
Egret3DExportTools.ExportToolsWindow.ExportPrefabs ()
Egret3DExportTools.ExportToolsWindow.Update ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.SendUpdate () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:367)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:191)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.