Skip to content

Commit

Permalink
v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Mar 7, 2022
1 parent 92c3ec7 commit 254e344
Show file tree
Hide file tree
Showing 121 changed files with 11,417 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build*
*.bundle
*.app/
.DS_Store
default.tf
*.unitypackage
17 changes: 17 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[submodule "submodules/libadm"]
path = submodules/libadm
url = https://github.com/ebu/libadm.git
[submodule "submodules/libbw64"]
path = submodules/libbw64
url = https://github.com/ebu/libbw64.git
[submodule "submodules/bear"]
path = submodules/bear
url = [email protected]:bbc/rd-audio-bear.git
branch = master
[submodule "submodules/rd-audio-visr"]
path = submodules/rd-audio-visr
url = [email protected]:bbc/rd-audio-visr.git
branch = bear-develop-tomn
[submodule "submodules/libsamplerate"]
path = submodules/libsamplerate
url = [email protected]:libsndfile/libsamplerate.git
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.10.0)

project(libunityadm VERSION 1.0.0 LANGUAGES CXX)

set(Boost_USE_STATIC_LIBS ON)
add_subdirectory(submodules)
add_subdirectory(src)

message(${CMAKE_SYSTEM_NAME})
15 changes: 15 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Unity ADM Support project - Unity ADM Plugin

Copyright 2022 BBC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
1,301 changes: 1,301 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# unity-adm-support-plugin
Unity plugin providing ADM rendering support

## Installation

Obviously there are multiple ways to do the following steps, but they provide a baseline workflow;

### Windows Preparation

**Download/Install:**

- Boost 1.73 pre-built

### Mac Preparation

**Get Brew!** (see online) initialise with `brew doctor`
- brew install pkgconfig
- brew install boost

### ALL Operating Systems

**Generate SSH Keys**

Need logins and SSH keys for;
- github.com

To generate and upload keys;
- *In `~/.ssh/`*
- `ssh-keygen -t rsa -b 4096 -C "email@address"`
- Upload .pub content to relevent Git server
- Update `~/.ssh/config` with;

```
Host eg-github.com
IdentityFile ~/.ssh/eg-github
```

### Clone and Build unity-adm-support-plugin

*From the same project directory...*
- `git clone [email protected]:bbc/unity-adm-support-plugin.git`
- `cd .\unity-adm-support-plugin\`
- `git submodule update --init --recursive`
- `mkdir build`

*Open cmake-gui*
- Set Source directory to the `unity-adm-support-plugin` repository directory
- Set Build directory to the `unity-adm-support-plugin/build` directory
- "Configure"
- If not done automatically, set `Boost_INCLUDE_DIR` to your Boost directory
- "Configure", "Generate", "Open"

*From your IDE...*
- Build target `ALL_BUILD`, then `INSTALL` to copy all build products in to the Unity Project folders

### Prepare Unity project

*Open Unity Hub*
- Projects -> Add
- Select "Unity" folder in unity-adm-support-plugin repository

***NOTE:** Built for Unity 2019.4.1f1 - use this version or upgrade the Project (WARNING: will affect everyone if you commit it back!!)*
---------
## Packages and Packaging

The Unity ADM plugin is packaged as an Asset Package with the naming convention `UnityADM-([os]_[arch]).unitypackage`.

### Use in existing projects
The plugin will expect to find the SteamVR package within the same project, so ensure you download that from the asset store and import it.

Add the Unity ADM package to your existing project via the menu; `Assets -> Import Package -> Custom Package`. Then simply apply the `UnityAdm.cs` script to an object in the scene (usually main camera is fine). Configure it via the Inspector.

### Creating/updating packages
Firstly, ensure you have built release versions of the native plugin (`libunityadm`) for the platform(s) you wish to support. Run the CMake `INSTALL` target to ensure the built library is copied to the correct location as well as the `default.tf` data file.

Secondly, update the readme in the `UnityAdm` folder!

Using the Unity project included in this repository, go to `Assets -> Export Package`. Ensure only items in the `UnityAdm` folder are selected. Select export and provide a name according to the aforementioned naming convention.
87 changes: 87 additions & 0 deletions UnityAdmProject/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
[Aa]ssets/[Ss]team[Vv][Rr]/





# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
/[Ll]ibrary/*
!/[Ll]ibrary/[Ll]ast[Ss]cene[Mm]anager[Ss]etup.txt

# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
.vs/

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D generated file on crash reports
sysinfo.txt

# Builds
*.apk
*.aab
*.unitypackage

# Crashlytics generated file
crashlytics-build.properties

# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*

# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*

# Don't save our built C++ library
/[Aa]ssets/[Uu]nity[Aa]dm/[Pp]lugins

# Don't save our IR data
/[Aa]ssets/[Uu]nity[Aa]dm/[Dd]ata

# Other test files
/[Aa]ssets/[Oo]ther[Tt]est[Ff]iles
Binary file added UnityAdmProject/Assets/1khz-sq-obj-static.wav
Binary file not shown.
22 changes: 22 additions & 0 deletions UnityAdmProject/Assets/1khz-sq-obj-static.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
22 changes: 22 additions & 0 deletions UnityAdmProject/Assets/AmbixFOA-FrontSource.wav.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 254e344

Please sign in to comment.