Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ spatialos_worker_packages.json
build/
logs/
workers/unity/external-default-unityclient.log
workers/unity/Assets/Plugins/Improbable/Editor/Generated/
workers/unity/Assets/Plugins/Improbable/Editor/Generated.meta
workers/unity/Assets/Plugins/Improbable/Generated/
workers/unity/Assets/Plugins/Improbable/Generated.meta
workers/unity/Assets/Plugins/Improbable/EntityPrefabs/
workers/unity/Assets/Plugins/Improbable/EntityPrefabs.meta
workers/unity/Assets/Plugins/Improbable/Sdk/Dll/Generated.Code.*
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
**Note: This project runs on SpatialOS version 12.2.1 and not the latest version which is 13.0.0.**

# Starter Project
---

Expand Down
4 changes: 2 additions & 2 deletions spatialos.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "your_project_name_here",
"project_version": "1.0.0",
"sdk_version": "12.2.1",
"sdk_version": "13.0.0",
"dependencies": [
{"name": "standard_library", "version": "12.2.1"}
{"name": "standard_library", "version": "13.0.0"}
]
}
6 changes: 0 additions & 6 deletions workers/unity/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
build.json
.invoke.log
zip_toolbelt.log
Improbable.meta
Assets/Improbable
Assets/Plugins/Improbable
Assets/Plugins/x86/Improbable
Assets/Plugins/x86.meta
Assets/Plugins/x86_64/Improbable
Expand All @@ -16,10 +14,6 @@ Assembly-CSharp-firstpass.csproj
Assembly-CSharp.csproj
.spatialos

# Improbable Generated Build Scripts for Unity
spatialos.unity.client.build.json
spatialos.unity.worker.build.json

# Standard Unity Ignores
/[Ll]ibrary/
/[Tt]emp/
Expand Down
2 changes: 2 additions & 0 deletions workers/unity/Assets/EntityPrefabs/Cube.prefab.meta

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

2 changes: 2 additions & 0 deletions workers/unity/Assets/EntityPrefabs/Player.prefab.meta

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

2 changes: 2 additions & 0 deletions workers/unity/Assets/EntityPrefabs/PlayerCreator.prefab.meta

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

10 changes: 10 additions & 0 deletions workers/unity/Assets/Plugins/Improbable.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.

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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

namespace Improbable.Unity.MinimalBuildSystem.Configuration
{
public enum BuildEnvironment
{
Local,
Cloud
}
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

using System;
using UnityEditor;

namespace Improbable.Unity.MinimalBuildSystem.Configuration
{
[Serializable]
public class BuildEnvironmentConfig
{
public SpatialBuildPlatforms BuildPlatforms = SpatialBuildPlatforms.Current;
public BuildOptions BuildOptions = 0;

[NonSerialized] public bool ShowBuildOptions = true;
[NonSerialized] public bool ShowBuildPlatforms = true;
}
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

using System.IO;
using Improbable.Unity.Util;

namespace Improbable.Unity.MinimalBuildSystem.Configuration
{
public static class BuildPaths
{
public static readonly string PrefabResourcesDirectory =
PathUtil.Combine("Assets", "Improbable", "Generated", "Resources", "EntityPrefabs").ToUnityPath();

public static readonly string PrefabSourceDirectory = PathUtil.Combine("Assets", "EntityPrefabs").ToUnityPath();

public static string BuildScratchDirectory
{
get { return Path.GetFullPath(Path.Combine("build", "worker")); }
}
}
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

#if !UNITY_2017_3_OR_NEWER
using System;
using UnityEditor;

namespace Improbable.Unity.MinimalBuildSystem.Configuration
{
/// <summary>
/// Fallback for Unity 2017.3f1 feature: EditorGUI.IndentLevelScope
/// </summary>
public class FallbackIndentLevelScope : IDisposable
{
private readonly int indent;

public FallbackIndentLevelScope(int increment)
{
indent = EditorGUI.indentLevel;
EditorGUI.indentLevel += indent;
}

public void Dispose()
{
EditorGUI.indentLevel = indent;
}
}
}
#endif

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

using System;
using UnityEngine;

namespace Improbable.Unity.MinimalBuildSystem.Configuration
{
class GUIColorScope : IDisposable
{
private readonly Color color;

public GUIColorScope(Color newColor)
{
color = GUI.color;
GUI.color = newColor;
}

public void Dispose()
{
GUI.color = color;
}
}
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

namespace Improbable.Unity.MinimalBuildSystem.Configuration
{
/// <summary>
/// Indicate whether or not built-out players should be compressed.
/// </summary>
public enum PlayerCompression
{
Enabled,
Disabled
}
}

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

using System.Linq;
using UnityEditor;
using UnityEngine;

namespace Improbable.Unity.MinimalBuildSystem.Configuration
{
internal class SceneItem
{
public readonly SceneAsset SceneAsset;
public bool Included;
private readonly bool exists;

public SceneItem(SceneAsset sceneAsset, bool included, SceneAsset[] inAssetDatabase)
{
SceneAsset = sceneAsset;
Included = included;
exists = inAssetDatabase.Contains(sceneAsset);
}

public static SceneItem Drawer(Rect position, SceneItem item)
{
using (item.exists ? null : new GUIColorScope(Color.red))
{
var positionWidth = position.width;
var labelWidth = GUI.skin.toggle.CalcSize(GUIContent.none).x + 5;

position.width = labelWidth;
item.Included = EditorGUI.Toggle(position, item.Included);

position.x += labelWidth;
position.width = positionWidth - labelWidth;

EditorGUI.ObjectField(position, item.SceneAsset, typeof(SceneAsset), false);
}

return item;
}
}
}

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

Loading