qcamei / unity-scene-web-exporter

Export Unity Scene to Three.js or A-Frame.

Home Page:http://libsora.so/unity-scene-web-exporter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnitySceneWebExporter

Build Status

Export Three.js or A-Frame From Unity Scene

screenshot

Screenshot

Unity3D scene

Unity3D scene

Three.js

Three.js

A-Frame

A-Frame

Feature

  • Export Scene to Three.js scene format (THREE.ObjectLoader can load exported data)
  • Export Scene to A-Frame document
  • Export C# Script variable
  • Support lightmapping

  1. Edit->Kanau->"Export AFrame" or "Export Three.js"
  2. Export

How to use

Install

Open your Unity3D project. Copy `/UnityProject/Assets/Kanau" directory into your project's assets directory.

copy kanau

Lightmapping (Optional)

If you don't want to export lightmapping, skip it. /UnityProject/Assets/Scenes/DemoLightmap is Lightmap Sample Scene.

Set Light as Baked.

baked light

Set GameObject as Static.

set static

Disable Automatic lightmap build to make exr files. Then, build lightmap.

  • Does <scene_name>/Lightmap-_comp_dir.exr exist?
  • Does <scene_name>/Lightmap-_comp_light.exr exist?
  • If automatic lightmap enabled, exr files doesn't exist.

build lightmap

Export

Edit -> Kanau -> Export Aframe or Export Three.js. Click Export and select target filepath.

kanau menu

  • Note : Unselect objects from Hierarchy view. If some objects are selected, only those are exported. (unselect means export all objects)

View (A-Frame)

Open exported html in browser.

View (Three.js)

  1. Export scene as scene.json. (hardcoded in viewer html)
  2. Copy exported file into /MiniThreejsViewer. (json file, images directory, models directory)
  3. Open /MiniThreejsViewer/index.html.

screenshot

Note

  • Tested on Unity3D 5.4.2p3.
  • Export configurations are used in A-Frame exporting. Three.js doesn't use it.
  • A-Frame is unstable library. (current A-Frame version is 0.3.2) In future, A-Frame exporter wiil be broken.

Similar Projects / Libraries

About

Export Unity Scene to Three.js or A-Frame.

http://libsora.so/unity-scene-web-exporter/

License:MIT License


Languages

Language:C# 89.1%Language:JavaScript 5.7%Language:HTML 4.6%Language:Shell 0.5%Language:CSS 0.1%