简体   繁体   中英

How do I import a three.js (JSON) model into Unity at runtime?

I have a Unity app which I would like to import a 3D model from a location on the Internet. I know how to download the resource, but how can you instantiate the JS model into a Unity mesh / object.

  1. First you need to parse the JSON and get the geometry, uv and normals. (info about the format is at https://github.com/mrdoob/three.js/wiki/JSON-Geometry-format-4 )
  2. Then you can use the Mesh class to dynamically instantiate a mesh into a game object ( https://docs.unity3d.com/Manual/GeneratingMeshGeometryProcedurally.html )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM