{"id":17998203,"url":"https://github.com/primaryobjects/unity-to-aframe","last_synced_at":"2025-03-26T04:31:46.839Z","repository":{"id":139343281,"uuid":"360944771","full_name":"primaryobjects/unity-to-aframe","owner":"primaryobjects","description":"Convert a Unity 3D scene to A-Frame.","archived":false,"fork":false,"pushed_at":"2023-01-16T16:30:30.000Z","size":4600,"stargazers_count":44,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T06:41:37.896Z","etag":null,"topics":["a-frame","aframe","ar","augmented-reality","html","javascript","plugin","unity","unity-3d","unity3d-plugin","virtual","virtual-reality","vr","web-vr","webvr"],"latest_commit_sha":null,"homepage":"https://aframe.io/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/primaryobjects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["primaryobjects"]}},"created_at":"2021-04-23T16:29:12.000Z","updated_at":"2024-02-20T02:57:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f3989ba-9670-475c-8f85-cb32f9f27be6","html_url":"https://github.com/primaryobjects/unity-to-aframe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Funity-to-aframe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Funity-to-aframe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Funity-to-aframe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Funity-to-aframe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primaryobjects","download_url":"https://codeload.github.com/primaryobjects/unity-to-aframe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245589266,"owners_count":20640254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a-frame","aframe","ar","augmented-reality","html","javascript","plugin","unity","unity-3d","unity3d-plugin","virtual","virtual-reality","vr","web-vr","webvr"],"created_at":"2024-10-29T21:24:34.874Z","updated_at":"2025-03-26T04:31:46.832Z","avatar_url":"https://github.com/primaryobjects.png","language":"C#","readme":"unity-to-aframe\n===============\n\nConvert a Unity 3D scene [A-Frame](https://aframe.io/).\n\n![Export A-Frame scene from Unity 3D](screenshot.gif)\n\n## About\n\nUnity-to-aframe is an easy Unity 3D plug-in to automatically export your scene to a WebVR virtual reality web page, using A-Frame.\n\nExported scenes include 3D objects, animations, textures, lighting, and audio.\n\n*Compatible with A-Frame version [1.1.0](https://aframe.io/docs/1.1.0/introduction/)+.*\n\n## Quick Start\n\n1. Clone [unity-to-aframe](https://github.com/primaryobjects/unity-to-aframe.git).\n2. Copy `Assets/unity-to-aframe` and `Assets/CombineMeshes` to the folder `Assets` in your Unity 3D project.\n3. Open your project from Unity 3D.\n4. Open the scene you want to export.\n5. Click the unity-to-aframe prefab to show the exporter inspector.\n6. If prompted for a Mono Script, select the object **UnityToAFrame** then drag \u0026 drop the Mono Script \"UnityToAFrame\" into the right-side toolbar to open the prefab tool UI.\n7. Click **Export** in the inspector.\n8. Find the `index.html` file in your project Assets folder under `Assets/unity-to-aframe/export/index.html`\n9. Launch a local web server in the `/export` folder using `python3 -m http.server` to view the result at `http://localhost:8000`\n\n### Additional Notes\n\n- You may need to copy `.png` images into the folder `Assets/unity-to-aframe/export/images` for textures used by your scene.\n\n- Some models render better using gltf format, instead of obj. You can convert your models using [gltf-exporer](https://github.com/Plattar/gltf-exporter) from within Unity and save to your `/export/models` directory. Finally, edit your exported index.html to load the gltf by changing the `\u003ca-obj-model\u003e` tag to `\u003ca-gltf-model src=\"models/your_model.gltf\"\u003e\u003c/a-gltf-model\u003e`\n\n- Linux users may need to install the following libraries: `sudo apt install libc6-dev` and `sudo apt install libgdiplus`.\n\n## Using Sound Effects\n\nTo add spatial sound effects to your VR scene, use the following [steps](https://gist.github.com/primaryobjects/66516de4423f302856ecb82f23edb07e#a-frame-audio-sound-in-ios) below.\n\n1. [Download](https://www.freesoundeffects.com/free-sounds/airplane-10004/) sound effects (mp3, wav) and copy to `Assets/unity-to-aframe/export/sounds`.\n2. In your `index.html` file, add the following section:\n    ```html\n    \u003cassets\u003e\n        \u003caudio id=\"mysound\" src=\"mysound.mp3\" preload=\"auto\"\u003e\u003c/audio\u003e\n    \u003c/assets\u003e\n    ```\n3. To add sound to a specific object, use the following example:\n    ```html\n    \u003ca-box src=\"url(images/box.png); audio=\"src: #mysound; loop: true; distance: 8;\"\u003e\u003c/a-box\u003e\n    ```\n\nSound effects use [Howler.js](https://howlerjs.com/) and are compatible with Chrome, Safari, mobile devices, Android, and Apple iPhone iOS.\n\n### Audio Tag Options\n\n```\nloop: boolean, true to play sound effect continuously, default is false\nvolume: integer, default is 1\ndistance: integer, how close the camera must be to the object before playing audio, default is 8\nfade: integer, how quickly the sound fades when moving away from the object, default is 5000\n```\n\n## Export Options\n\n![unity-to-aframe options](screenshot2.png)\n\n### General\n\nTitle\n  Title of A-Frame.\n\nLibrary Address\n  A-Frame library address you want to use.\n\nEnable_performance_statistics\n  Show Performance Statistics.\n\n### Sky\n\nEnable_Sky - Enable A-Frame Sky.\n\nSky_color_from_Main Camera_Background - Use sky color from Main Camera Background.\n\nSky_color - Sky color.\n\nSky_texture - Sky texture.\n\n### Camera\n\nWasd_controls_enabled - Enable WASD control.\n\nLook_controls_enabled - Enable Look control.\n\nEnable_Sky - Enable A-Frame Sky.\n\nCursor_visible - Change cursor visible.\n\nCursor_opacity - Change cursor opacity.0 to 1.\n\nCursor_scale - Change cursor scale.\n\nCursor_color - Change cursor color.\n\nCursor_offset - Change cursor offset.\n  \nCursor_maxdistance - Change cursor max distance.\n\n### Clear Exported Files\n\nClean exported files. Note, if you edited files in this folder, they will be deleted.\n\n## Supported Unity3D Objects\n\n### Main Camera\n\nSupported parameters are Position, Rotation, Fov, NearClip, FarClip.\n\n### Light\n\nDirectional, Point, Spot\nSupported parameters are Position, Rotaion, Intensity, Color.\n\n### Single Sprite\n\nExport as Image.\n\n### Cube\n\nExport as Box.\nSupported parameters are Scale xyz.\n\n### Sphere\n\nExport as Sphere.\nScale parameters are exported average xyz. because A-Frame Sphere have parameter only radius.\n\n### Cylinder\n\nExport as cylinder.\nScale y export as height.\nScale xz are exported average for A-Frame cylinder radius.\n\n### Plane\n\nExport as plane.\n\n### Other Meshes\n\nExport as Obj.\n\n### Physics Engine\n\nUsing the [aframe-particle-system-component](https://github.com/IdeaSpaceVR/aframe-particle-system-component).\n\n### Sound Engine\n\nUsing [Howler.js](https://howlerjs.com/) with spacial audio to play sound effects as you approach objects. See [example](https://gist.github.com/primaryobjects/66516de4423f302856ecb82f23edb07e#file-index-html) for how to add to your VR objects.\n\n## References\n\nThis project was originally forked from [UnityAFrameExporter](https://github.com/umiyuki/UnityAFrameExporter).\n","funding_links":["https://github.com/sponsors/primaryobjects"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Funity-to-aframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimaryobjects%2Funity-to-aframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Funity-to-aframe/lists"}