• This repository has been archived on 22/Jul/2024
  • Stars
    star
    317
  • Rank 132,216 (Top 3 %)
  • Language
    C
  • License
    Other
  • Created over 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

INACTIVE - Servo for Unity - experimental

About this project

This project constitutes a Unity native plugin and a set of Unity C# script components allow third parties to incorporate Servo browser windows into Unity scenes.

For more background information, see the blog post at https://blog.mozvr.com/a-browser-plugin-for-unity/

Structure of this repository

  1. The Unity project is src/ServoUnity, with a sample scene at src/ServoUnity/Assets/ExampleScene.unity.
  2. Native code for the Unity plugin is in src/ServoUnityPlugin.
  3. The compiled plugin will be placed in src/ServoUnity/Assets/Plugins.
  4. The Unity C# scripts designed to be used by the user's application are in src/ServoUnity/Assets/Scripts.

License

The license file sets out the full license text.

The code is licensed under the MPL2.

This license is compatible with use in a proprietary and/or commercial application.

Building from source

Prerequisites

What Minimum version Where to download
Unity 2019.3 https://unity.com
For macOS: Xcode tools https://developer.apple.com

During this development phase of the project, only macOS is supported.

libsimpleservo2

Servo itself enters the plugin through the wrapper library libsimpleservo2. You can find a binary build of libsimpleservo2 at https://github.com/philip-lamb/servo/releases, or you can build it from source. This fork of the servo repository will soon be merged back to the main servo repo and these instructions will be amended once that is complete.

Build libsimpleservo2 from source:

  1. git clone --branch phil-ss2-headless https://github.com/philip-lamb/servo.git
  2. cd servo
  3. ./mach bootstrap
  4. ./mach build --libsimpleservo2 The release libraries will be built by default to path target/release.

The servo-unity plugin build

The Xcode project for the plugin is at src/ServoUnityPlugin/macOS/servo_unity.xcodeproj. Compiling this project requires linking to Unity's plugin headers which are normally contained inside the Unity application bundle. Check that the build setting for header search paths is correct for the version of Unity installed on your system.

Prior to building, a build step removes any previous plugin build (servounity.bundle) from the Unity project's Plugins folder. The Xcode project builds the plugin bundle directly into the same folder. If you wish to change this behaviour, uncheck "deployment postprocessing" in the Xcode build settings.

Operating the plugin inside the Unity Editor

The plugin can run inside the Unity Editor, but some setup is required first:]

  1. At present, the plugin can be run and stopped once per Editor session. (This is due to the fact that Unity does not unload and reload native plugins between runs in the Editor.) You'll need to quit and relaunch the Editor before running again.
  2. The plugin currently looks for required GStreamer plugins at the same path as the executable; when running in the Unity Editor, this is unfortunately the path to the Unity Editor executable inside the Unity app bundle. We're working on fixing this, but in the meantime, prior to use, you'll need to navigate to the libsimpleservo2 binary folder, and execute the following command: sudo cp libgstapp.so libgstlibav.so libgstvideoconvert.so libgstaudioconvert.so libgstmatroska.so libgstvideofilter.so libgstaudiofx.so libgstogg.so libgstvideoparsersbad.so libgstaudioparsers.so libgstopengl.so libgstvideoscale.so libgstaudioresample.so libgstopus.so libgstvolume.so libgstautodetect.so libgstplayback.so libgstvorbis.so libgstcoreelements.so libgstproxy.so libgstvpx.so libgstdeinterlace.so libgstrtp.so libgstwebrtc.so libgstinterleave.so libgsttheora.so libgstisomp4.so libgsttypefindfunctions.so "/Applications/Unity/Hub/Editor/2019.3.13f1/Unity.app/Contents/MacOS/" You might need to amend the final path for a different version of the Unity Editor.

More Repositories

1

FirefoxReality

INACTIVE - A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
Java
769
star
2

unity-webxr-export

INACTIVE - Assets for creating WebXR-enabled Unity3D projects.
JavaScript
622
star
3

WebXR-emulator-extension

INACTIVE - WebXR emulator extension
JavaScript
459
star
4

hello-webxr

INACTIVE - Hello WebXR
JavaScript
288
star
5

vr-web-examples

Example VR enabled web pages.
JavaScript
205
star
6

hubs-blender-exporter

The Hubs Blender Add-on enables artists to export their creations to the immersive web with Mozilla Hubs
Python
165
star
7

webvr-spec

*** MOVED TO https://github.com/w3c/webvr ***
HTML
158
star
8

sechelt

INACTIVE - A virtual reality fly through of a 3D landscape, built with Three.js and Cinema 4D.
JavaScript
151
star
9

immersive-custom-elements

INACTIVE - Immersive Custom Elements
JavaScript
134
star
10

hubs-avatar-pipelines

Mozilla Hubs avatars and related assets for avatar customization.
95
star
11

panorama-viewer

A Three.js panorama viewer
JavaScript
93
star
12

webxr-ios-js

INACTIVE - A JS implementation of WebXR used *only* in Mozilla's WebXR Viewer
JavaScript
71
star
13

webvr-demos

Archived WebVR demos from Mozilla WebVR, circa GDC 2016.
JavaScript
63
star
14

blender-gltf-multiexport-addon

INACTIVE - Blender add-on to export multiple glTFs at once
Python
56
star
15

hubs-discord-bot

A Discord bot that helps you use Mozilla Hubs together with people in Discord.
JavaScript
47
star
16

hiro

JavaScript
42
star
17

jumpy-balls

INACTIVE - Example game with ecsy, three.js and ammo.js physics
JavaScript
34
star
18

gamepad-plus

INACTIVE - a superb library that extends the Gamepad API with super powers
JavaScript
34
star
19

webxr-geospatial

INACTIVE - A library that combines the Web geolocation API with WebXR to support geospatial AR
JavaScript
34
star
20

puzzle-rain

INACTIVE - A musical WebVR journey for the HTC Vive. Brought to you by Mozilla VR.
JavaScript
33
star
21

mred

INACTIVE - Mixed Reality Editor
JavaScript
27
star
22

xr-store

INACTIVE - A progressive XR demo. Powered by A-Frame.
JavaScript
23
star
23

FirefoxRealityPC

INACTIVE - Firefox Reality for PC-connected VR platforms
C#
22
star
24

hubs-docs

JavaScript
21
star
25

blender-gltf-behavior-graph

Tool for editing GLTF Behavior graphs in Blender (extremely experimental, opinionated for usage in Mozilla Hubs)
Python
20
star
26

webvr-addon

Mozilla WebVR Plus browser extension for Firefox
JavaScript
19
star
27

foxr-run

INACTIVE - Run Foxr, Run!
JavaScript
19
star
28

webgfx-tests

INACTIVE - Performance tests for canvas and webgl
JavaScript
19
star
29

MOZ_text

INACTIVE - MOZ_text glTF Extension
JavaScript
18
star
30

three-batch-manager

TypeScript
17
star
31

hubs-plugin-api

INACTIVE - Experimental Hubs plugin API discussion and evaluation
JavaScript
16
star
32

hubs-architecture-kit

JavaScript
14
star
33

vrb

INACTIVE - Support render library for FirefoxReality
C++
13
star
34

gltf-navmesh-generator

Small library and command line utility for generating precomputed navmesh data for aframe-extra's nav-mesh
JavaScript
12
star
35

botomatic

INACTIVE - Hubs Bot lambda
JavaScript
10
star
36

photomnemonic

Simple AWS Lambda service for grabbing web screenshots
JavaScript
10
star
37

lib-hubs

Common Hubs and Spoke libraries.
JavaScript
9
star
38

OpenWnn

INACTIVE - OpenWnn fork
C
9
star
39

vr-mozilla-org

INACTIVE - Source for Mozilla Mixed Reality static site
CSS
9
star
40

gltf-bundle

INACTIVE
JavaScript
9
star
41

hubs-glb-tools

Tools for working with glb files for Mozilla Hubs [WIP]
TypeScript
8
star
42

gltf-unlit-generator

INACTIVE
Rust
6
star
43

mr-social-assets

INACTIVE - Open Source Assets from the Social Mixed Reality Team
Mathematica
6
star
44

blender-behavior-graph-examples

A collection of Blender files demonstrating behavior graphs
6
star
45

webvr-libs

WebVR libraries
JavaScript
6
star
46

nearspark

AWS lambda service for creating image thumbnails
JavaScript
5
star
47

Hubs-Backup-Tool

A tool for baking up your Hubs instance account data
TypeScript
5
star
48

avatar-texture-tool

A resource for creating avatar textures for Hubs avatars
JavaScript
5
star
49

ecsy-webpack-boilerplate

INACTIVE - A simple boilerplate project for getting up and running with ECSY and Webpack.
JavaScript
5
star
50

fxr-cli

INACTIVE - A command-line tool for installing and automating the Firefox Reality virtual-reality browser.
JavaScript
4
star
51

gltf-content-hash

INACTIVE
JavaScript
4
star
52

hubs-duck-addon

TypeScript
4
star
53

symbolgenerator

INACTIVE - The symbol generator for Firefox Reality native code
Python
4
star
54

hubs-configtool

Tool for reading and writing Hubs configuration values.
JavaScript
3
star
55

spoke-react-components

https://mixedreality.mozilla.org/spoke-react-components
JavaScript
3
star
56

pathfinder_cpp

INACTIVE - c++11 implementation of PathFinder
C
3
star
57

hubs-template-addon

A template project for creating Hubs add-ons
TypeScript
3
star
58

hubs-sound-pack

JavaScript
3
star
59

hubs-ts-types

Typescript definitions for Hubs
TypeScript
3
star
60

hubs-portals-addon

A hubs add-on that adds support for portals.
TypeScript
3
star
61

oculus

JavaScript
2
star
62

webxr-todo

INACTIVE - List of ideas to improve the WebXR ecosystem
2
star
63

lobby

INACTIVE - WebVR Lobby
JavaScript
2
star
64

webxr-agent

Helper for handling presentation, navigation, and telemetry for WebXR experiences.
JavaScript
2
star
65

FirefoxReality-gvr-android-sdk

INACTIVE - GVR headers and library dependancies for Daydream build of Firefox Reality
C++
1
star
66

hubs-iframe-test

INACTIVE - GitHub Pages hosted page for testing Hubs in iframes
HTML
1
star
67

fbx-gltf-pipeline

INACTIVE
JavaScript
1
star
68

ita

A service for doing Hubs configuration management.
JavaScript
1
star
69

hubs-behavior-graphs-addon

A behavior graphs addon for Hbs
TypeScript
1
star
70

create-hubs-app

INACTIVE
JavaScript
1
star
71

badge-maker

INACTIVE
JavaScript
1
star
72

gltf-component-data

INACTIVE - Small library and command line utility for adding component data to a glTF file.
JavaScript
1
star
73

ecsy-three-webpack

INACTIVE - Boilerplate project for ecsy-three and Webpack
JavaScript
1
star
74

gltf-collision-exporter

INACTIVE
1
star
75

horizon

(2015) Horizon was an experimental VR browser built on web standards using CSS-VR.
JavaScript
1
star
76

area-demo-service-task

INACTIVE - Integration of OpenSceneGraph-based rendering with WebXR in a demonstration service task for AR Enterprise Alliance
JavaScript
1
star