https://github.com/if1live/unity-scene-web-exporter
Export Unity Scene to Three.js or A-Frame.
https://github.com/if1live/unity-scene-web-exporter
Last synced: 6 months ago
JSON representation
Export Unity Scene to Three.js or A-Frame.
- Host: GitHub
- URL: https://github.com/if1live/unity-scene-web-exporter
- Owner: if1live
- License: mit
- Created: 2016-06-23T13:30:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-31T20:50:01.000Z (almost 8 years ago)
- Last Synced: 2024-12-08T07:24:35.355Z (6 months ago)
- Language: C#
- Homepage: https://if1live.github.io/unity-scene-web-exporter/
- Size: 17.1 MB
- Stars: 188
- Watchers: 25
- Forks: 51
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UnitySceneWebExporter
[](https://travis-ci.org/if1live/unity-scene-web-exporter)
Export Three.js or A-Frame From Unity Scene

## Screenshot
### Unity3D scene
### Three.js
### 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##
2. Edit->Kanau->"Export AFrame" or "Export Three.js"
3. Export## How to use
### Install
Open your Unity3D project. Copy `/UnityProject/Assets/Kanau" directory into your project's assets directory.
### Lightmapping (Optional)
If you don't want to export lightmapping, skip it.
`/UnityProject/Assets/Scenes/DemoLightmap` is Lightmap Sample Scene.Set Light as `Baked`.

Set GameObject as `Static`.

Disable Automatic lightmap build to make exr files. Then, build lightmap.
* Does /Lightmap-_comp_dir.exr exist?
* Does /Lightmap-_comp_light.exr exist?
* If automatic lightmap enabled, exr files doesn't exist.
### Export
`Edit` -> `Kanau` -> `Export Aframe` or `Export Three.js`. Click `Export` and select target filepath.
* 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`.
## 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
* [J3D - unity3d-to-threejs exporter](https://github.com/drojdjou/J3D)
* [UnityAFrameExporter - Export A-Frame From Unity Scene](https://github.com/umiyuki/UnityAFrameExporter)
* [Three.js JSON Exporter - via Unity Asset Store](https://www.assetstore.unity3d.com/en/#!/content/40550)
* [unity-webvr - Export Unity scene to WebGL](https://github.com/xirvr/unity-webvr)