Skip to content

Commit

Permalink
Merge pull request #164 from oneleif/master
Browse files Browse the repository at this point in the history
version 0.5.0
  • Loading branch information
ambid17 committed May 6, 2020
2 parents 05996c7 + b80972c commit 14f34c7
Show file tree
Hide file tree
Showing 267 changed files with 107,349 additions and 93,303 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/CD_Linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 📦 Linux

on:
pull_request: { branches: [master] }
push: { branches: [development] }

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

jobs:
readmeWorkflow:
name: Build Linux
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true

# Test
- name: Run tests
uses: webbertakken/[email protected]
with:
projectPath: BunnyHopMaster
unityVersion: 2019.3.9f1

# Build
- name: Build project
uses: webbertakken/[email protected]
with:
projectPath: BunnyHopMaster
unityVersion: 2019.3.9f1
targetPlatform: StandaloneLinux64

# Output
- uses: actions/upload-artifact@v1
with:
name: LinuxBuild
path: build

41 changes: 41 additions & 0 deletions .github/workflows/CD_MacOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 📦 MacOS

on:
pull_request: { branches: [master] }
push: { branches: [development] }

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

jobs:
readmeWorkflow:
name: Build MacOS
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true

# Test
- name: Run tests
uses: webbertakken/[email protected]
with:
projectPath: BunnyHopMaster
unityVersion: 2019.3.9f1

# Build
- name: Build project
uses: webbertakken/[email protected]
with:
projectPath: BunnyHopMaster
unityVersion: 2019.3.9f1
targetPlatform: StandaloneOSX

# Output
- uses: actions/upload-artifact@v1
with:
name: MacOSBuild
path: build

42 changes: 42 additions & 0 deletions .github/workflows/CD_Windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 📦 Windows

on:
pull_request: { branches: [master] }
push: { branches: [development] }

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

jobs:
readmeWorkflow:
name: Build Windows
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true

# Test
- name: Run tests
uses: webbertakken/[email protected]
with:
projectPath: BunnyHopMaster
unityVersion: 2019.3.9f1

# Build
- name: Build project
uses: webbertakken/[email protected]
with:
projectPath: BunnyHopMaster
unityVersion: 2019.3.9f1
targetPlatform: StandaloneWindows64

# Output
- uses: actions/upload-artifact@v1
with:
name: WindowsBuild
path: build


25 changes: 25 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 🧪 Unity

on: [push]

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

jobs:
readmeWorkflow:
name: Test Workflow
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true

# Test
- name: Run tests
uses: webbertakken/[email protected]
with:
projectPath: BunnyHopMaster
unityVersion: 2019.3.9f1

23 changes: 23 additions & 0 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Acquire activation file

on: [push]

jobs:
activation:
name: Request manual activation file 🔑
runs-on: ubuntu-latest
steps:

# Request manual activation file
- name: Request manual activation file
id: getManualLicenseFile
uses: webbertakken/[email protected]
with:
unityVersion: 2019.3.9f1

# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
Empty file.

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

20 changes: 20 additions & 0 deletions BunnyHopMaster/Assets/Editor/CreateSurfRamp.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(SurfRampMeshGenerator))]
public class CreateSurfRamp : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();

SurfRampMeshGenerator myScript = (SurfRampMeshGenerator)target;

if (GUILayout.Button("Build Object"))
{
myScript.BuildObject();
}
}
}
11 changes: 11 additions & 0 deletions BunnyHopMaster/Assets/Editor/CreateSurfRamp.cs.meta

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

59 changes: 59 additions & 0 deletions BunnyHopMaster/Assets/Editor/ReplaceWithPrefab.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using UnityEngine;
using UnityEditor;

public class ReplaceWithPrefab : EditorWindow
{
[SerializeField] private GameObject prefab;

[MenuItem("Tools/Replace With Prefab")]
private static void CreateReplaceWithPrefab()
{
GetWindow<ReplaceWithPrefab>();
}

[System.Obsolete]
private void OnGUI()
{
prefab = (GameObject)EditorGUILayout.ObjectField("Prefab", prefab, typeof(GameObject), false);

if (GUILayout.Button("Replace"))
{
var selection = Selection.gameObjects;

for (var i = selection.Length - 1; i >= 0; --i)
{
var selected = selection[i];
PrefabType prefabType = PrefabUtility.GetPrefabType(prefab);
GameObject newObject;

if (prefabType == PrefabType.Prefab)
{
newObject = (GameObject)PrefabUtility.InstantiatePrefab(prefab);
}
else
{
newObject = Instantiate(prefab);
newObject.name = prefab.name;
}

if (newObject == null)
{
Debug.LogError("Error instantiating prefab");
break;
}

Undo.RegisterCreatedObjectUndo(newObject, "Replace With Prefabs");
newObject.transform.parent = selected.transform.parent;
newObject.transform.localPosition = selected.transform.localPosition;
newObject.transform.localRotation = selected.transform.localRotation;
newObject.transform.localScale = selected.transform.localScale;
newObject.name += " (" + i + ")";
newObject.transform.SetSiblingIndex(selected.transform.GetSiblingIndex());
Undo.DestroyObjectImmediate(selected);
}
}

GUI.enabled = false;
EditorGUILayout.LabelField("Selection count: " + Selection.objects.Length);
}
}
11 changes: 11 additions & 0 deletions BunnyHopMaster/Assets/Editor/ReplaceWithPrefab.cs.meta

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

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

27 changes: 27 additions & 0 deletions BunnyHopMaster/Assets/EditorTests/EditorTests.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "EditorTests",
"references": [
"UnityEngine.TestRunner",
"UnityEditor.TestRunner",
"GameAssembly"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll",
"Castle.Core.dll",
"NSubstitute.dll",
"System.Runtime.CompilerServices.Unsafe.dll",
"System.Threading.Tasks.Extensions.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 7 additions & 0 deletions BunnyHopMaster/Assets/EditorTests/EditorTests.asmdef.meta

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

29 changes: 29 additions & 0 deletions BunnyHopMaster/Assets/EditorTests/SampleEditorTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;

namespace Tests
{
public class SampleEditorTest
{
// A Test behaves as an ordinary method
[Test]
public void SampleEditorTestSimplePasses()
{
// Use the Assert class to test conditions
Assert.True(true);
}

// A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
// `yield return null;` to skip a frame.
[UnityTest]
public IEnumerator SampleEditorTestWithEnumeratorPasses()
{
// Use the Assert class to test conditions.
// Use yield to skip a frame.
yield return null;
}
}
}
11 changes: 11 additions & 0 deletions BunnyHopMaster/Assets/EditorTests/SampleEditorTest.cs.meta

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

This file was deleted.

Loading

0 comments on commit 14f34c7

Please sign in to comment.