This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void PerformBuild () | |
{ | |
Console.WriteLine (":: Performing build"); | |
var buildTarget = GetBuildTarget (); | |
var buildPath = GetBuildPath (); | |
var buildName = GetBuildName (); | |
var fixedBuildPath = GetFixedBuildPath (buildTarget, buildPath, buildName); | |
Console.WriteLine("Fixed build path:" + fixedBuildPath); | |
var buildInfo = BuildPipeline.BuildPlayer (GetEnabledScenes (), fixedBuildPath, buildTarget, GetBuildOptions ()); | |
if( buildInfo.summary.result == BuildResult.Succeeded ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
set -x | |
mkdir -p /root/.cache/unity3d | |
mkdir -p /root/.local/share/unity3d/Unity/ | |
set +x | |
echo 'Writing $UNITY_LICENSE_CONTENT to license file /root/.local/share/unity3d/Unity/Unity_lic.ulf' | |
echo "$UNITY_LICENSE_CONTENT" | base64 --decode | tr -d '\r' > /root/.local/share/unity3d/Unity/Unity_lic.ulf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
set -x | |
echo "Building for $BUILD_TARGET" | |
export BUILD_PATH=./Builds/$BUILD_TARGET/ | |
mkdir -p $BUILD_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
docker run \ | |
-e BUILD_NAME \ | |
-e UNITY_LICENSE_CONTENT \ | |
-e BUILD_TARGET \ | |
-e UNITY_USERNAME \ | |
-e UNITY_PASSWORD \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
executors: | |
unity_exec: | |
docker: | |
- image: gableroux/unity3d:2018.4.5f1-android | |
environment: | |
BUILD_NAME: my_build_name | |
.build: &build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using NUnit.Framework; | |
using UnityEngine; | |
using UnityEngine.TestTools; | |
namespace Tests | |
{ | |
public class AssetSpawnerTest | |
{ | |
[UnityTest] | |
public IEnumerator Should_InstantiateObject_When_GivenStringHasNameAndPosition() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using NUnit.Framework; | |
using TDDForUnity; | |
using UnityEngine; | |
using UnityEngine.TestTools; | |
namespace Tests | |
{ | |
public class AssetSpawnerTest | |
{ | |
[UnityTest] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AssetSpawner | |
{ | |
public void createAGameObject() | |
{ | |
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); | |
cube.name = "CubeOne"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AssetSpawner | |
{ | |
public void createAGameObjectFromString(String csvString) | |
{ | |
String[] tokens = csvString.Split(",".ToCharArray()); | |
if (tokens.Length >= 4) | |
{ | |
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); | |
cube.name = tokens[0]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AssetSpawnerTest | |
{ | |
[UnityTest] | |
public IEnumerator Should_InstantiateObject_When_GivenStringHasNameAndPosition() | |
{ | |
//given | |
String csvString = "CubeX,2,3,3"; | |
String expectedName = "CubeX"; | |
//when | |
AssetSpawner assetSpawner = new AssetSpawner(); |
OlderNewer