Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request #24 from googlesamples/release-schur
Browse files Browse the repository at this point in the history
release-schur
  • Loading branch information
chaosemer committed Jul 27, 2015
2 parents df846fc + da401ea commit 439c7e2
Show file tree
Hide file tree
Showing 542 changed files with 11,147 additions and 3,032 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Project Tango UnitySDK Example Projects
Project Tango UnitySDK Example Project
===========================================
Copyright (C) 2015 Google Inc.

Expand All @@ -17,6 +17,18 @@ These are the Project Tango UnitySDK Examples compilable in Unity 5 and above:

* **Augmented Reality Example(Experimental)** - The augmented reality example shows how to use the video camera overlay and motion tracking data to create a augmented reality experience.

<h2>Project Layout</h2>

The example project has the following folders:
* **Editor/Tango/** - Tango-specific Unity3D editor integration
* **Google-Unity/** - General Android lifecycle management
* **Plugins/Android/** - General Android and Tango-specific libraries
* **Scenes/** - All the Tango example scenes
* **Standard Assets/** - Unity packages we are using
* **TangoExamples/** - One subfolder here per example
* **TangoPrefabs/** - Common Tango prefabs, like a simple camera
* **TangoSDK/** - Unity3D interface to the Tango libraries

<h2>Support</h2>

First please take a look at our [FAQ](http://stackoverflow.com/questions/tagged/google-project-tango?sort=faq&amp;pagesize=50) page. Most of the issues can be solved by the FAQ section.
Expand Down
195 changes: 195 additions & 0 deletions UnityExamples/Assets/Editor/BuildTools.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
//-----------------------------------------------------------------------
// <copyright file="BuildTools.cs" company="Google">
//
// Copyright 2015 Google Inc. All Rights Reserved.
//
// </copyright>
//-----------------------------------------------------------------------
using System.Collections;
using UnityEngine;
using UnityEditor;

/// <summary>
/// Build scripts for this specific project. Uses BuildUtil.cs, which should be sharable across
/// all projects.
///
/// To use this from the command line, run the following command:
/// <FULLPATH_UNITY.APP>/Contents/MacOS/Unity -batchmode -projectPath <FULLPATH> -executeMethod <METHOD_TO_RUN> -quit
///
/// For example:
/// /Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -projectPath ~/Unity/tango-examples-unity/UnityExamples/ -executeMethod BuildTools.BuildAll -quit
///
/// For more info, goto <http://docs.unity3d.com/Manual/CommandLineArguments.html>
/// </summary>
public class BuildTools
{
private static BuildUtil.APKSettings areaLearningAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Area Learning",
Icon = "TangoExamples/AreaLearning/Textures/icon.png",
Scenes = new string[] { "Scenes/AreaLearning.unity" },
BundleIdentifier = "com.projecttango.experiments.unityarealearning"
};

private static BuildUtil.APKSettings motionTrackingAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Motion Tracking",
Icon = "TangoExamples/MotionTracking/Textures/icon.png",
Scenes = new string[] { "Scenes/MotionTracking.unity" },
BundleIdentifier = "com.projecttango.experiments.unitymotiontracking"
};

private static BuildUtil.APKSettings pointCloudAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Point Cloud",
Icon = "TangoExamples/PointCloud/Textures/icon.png",
Scenes = new string[] { "Scenes/PointCloud.unity" },
BundleIdentifier = "com.projecttango.experiments.unitypointcloud"
};

private static BuildUtil.APKSettings augmentedRealityAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Augmented Reality",
Icon = "TangoExamples/ExperimentalAugmentedReality/Textures/ar_icon.png",
Scenes = new string[] { "Scenes/ExperimentalAugmentedReality.unity" },
BundleIdentifier = "com.projecttango.experiments.augmentedreality"
};

private static BuildUtil.APKSettings meshBuilderAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Mesh Builder",
Icon = null,
Scenes = new string[] { "Scenes/ExperimentalMeshBuilder.unity" },
BundleIdentifier = "com.google.projecttango.meshbuilder"
};

private static BuildUtil.APKSettings persistentStateAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Persistent State",
Icon = "TangoExamples/ExperimentalPersistentState/Textures/Moto-ProjectTango_Logo Only Square copy.png",
Scenes = new string[]
{
"Scenes/ExperimentalPersistentState/ExperimentalPersistentState_StartScene.unity",
"Scenes/ExperimentalPersistentState/ExperimentalPersistentState_GameScene.unity"
},
BundleIdentifier = "com.projecttango.persistentstate",
};

private static BuildUtil.APKSettings virtualRealityAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity VirtualReality",
Icon = "TangoExamples/ExperimentalVirtualReality/Textures/icon.png",
Scenes = new string[] { "Scenes/ExperimentalVirtualReality.unity" },
BundleIdentifier = "com.projecttango.experimental.virtualreality"
};

private static BuildUtil.PackageSettings sdkPackage = new BuildUtil.PackageSettings
{
PackageName = "TangoSDK",
Directories = new string[] { "Editor", "Google-Unity", "Plugins", "TangoSDK" }
};

private static BuildUtil.PackageSettings sdkPlusPrefabsPackage = new BuildUtil.PackageSettings
{
PackageName = "TangoSDK+Prefabs",
Directories = new string[] { "Editor", "Google-Unity", "Plugins", "TangoPrefabs", "TangoSDK" }
};

/// <summary>
/// Builds all the appropriate APKs for this project.
/// </summary>
[MenuItem("Tango/Build/All", false, 1)]
public static void BuildAll()
{
BuildUtil.BuildAPK(areaLearningAPK);
BuildUtil.BuildAPK(motionTrackingAPK);
BuildUtil.BuildAPK(pointCloudAPK);
BuildUtil.BuildAPK(augmentedRealityAPK);
BuildUtil.BuildAPK(meshBuilderAPK);
BuildUtil.BuildAPK(persistentStateAPK);
BuildUtil.BuildAPK(virtualRealityAPK);
BuildUtil.BuildPackage(sdkPackage);
BuildUtil.BuildPackage(sdkPlusPrefabsPackage);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/SDK Package", false, 21)]
public static void BuildSdkPackage()
{
BuildUtil.BuildPackage(sdkPackage);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/SDK+Prefabs Package", false, 21)]
public static void BuildSdkPlusPrefabsPackage()
{
BuildUtil.BuildPackage(sdkPlusPrefabsPackage);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Area Learning")]
public static void BuildAreaLearning()
{
BuildUtil.BuildAPK(areaLearningAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Motion Tracking")]
public static void BuildMotionTracking()
{
BuildUtil.BuildAPK(motionTrackingAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Point Cloud")]
public static void BuildPointCloud()
{
BuildUtil.BuildAPK(pointCloudAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Augmented Reality")]
public static void BuildAugmentedReality()
{
BuildUtil.BuildAPK(augmentedRealityAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Mesh Builder")]
public static void BuildMeshBuilder()
{
BuildUtil.BuildAPK(meshBuilderAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Persistent State")]
public static void BuildPersistentState()
{
BuildUtil.BuildAPK(persistentStateAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Virtual Reality")]
public static void BuildVirtualReality()
{
BuildUtil.BuildAPK(virtualRealityAPK);
}
}

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

Loading

0 comments on commit 439c7e2

Please sign in to comment.