Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

No more schema copying #953

Merged
merged 16 commits into from
May 29, 2019
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ workers/unity/Assets/Generated/Source/**/*.*
workers/unity/Assets/Plugins/Improbable/
workers/unity/Assets/Plugins/Improbable.meta

# Schema from Unity Package Manager Packages (Copied via tools/CopySchema)
schema/from_gdk_packages
_ReSharper.Caches

workers/unity/Packages/com.improbable.gdk.tools/.CodeGenerator/GdkCodeGenerator/Generated

# Jetbrains
workers/unity/Assets/Plugins/Editor/Jetbrains
workers/unity/Assets/Plugins/Editor/Jetbrains.meta

# Test project.
/test-project/build
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## Unreleased

### Breaking Changes

- Schema from packages are no longer copied into the root `schema` directory.
paulbalaji marked this conversation as resolved.
Show resolved Hide resolved
- Renamed the `Schema` directory within packages to `.schema`, to avoid generating unecessary `.meta` files.
- Update feature module schema to the correct namespaces and folders within `.schema`.
- If you use schema that imports from GDK packages, you will need to change how you import GDK schema.
- Schema file Y in package `improbable.gdk.X` is imported using `import "improbable/gdk/X/Y.schema"`.
- For example, `import "from_gdk_packages/com.improbable.gdk.core/common.schema";` now becomes `import "improbable/gdk/core/common.schema";`.

### Changed

- Upgraded the project to be compatible with `2019.1.3f1`.
Expand All @@ -13,6 +22,7 @@
## `0.2.2` - 2019-05-15

### Breaking Changes

- Removed the `Improbable.Gdk.Mobile.Android` and `Improbable.Gdk.Mobile.iOS` packages. All functionality is now available inside the `Improbable.Gdk.Mobile` package.

### Added
Expand Down
11 changes: 10 additions & 1 deletion ci/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ cd "$(dirname "$0")/../"

SHARED_CI_DIR="$(pwd)/.shared-ci"
CLONE_URL="[email protected]:spatialos/gdk-for-unity-shared-ci.git"
PINNED_SHARED_CI_VERSION=$(cat ./ci/shared-ci.pinned)

# Clone the HEAD of the shared CI repo into ".shared-ci"

if [[ -d "${SHARED_CI_DIR}" ]]; then
rm -rf "${SHARED_CI_DIR}"
fi

git clone --verbose --depth 1 "${CLONE_URL}" "${SHARED_CI_DIR}"
mkdir "${SHARED_CI_DIR}"

# Workaround for being unable to clone a specific commit with depth of 1.
pushd "${SHARED_CI_DIR}"
git init
git remote add origin "${CLONE_URL}"
git fetch --depth 20 origin master
git checkout "${PINNED_SHARED_CI_VERSION}"
popd
1 change: 1 addition & 0 deletions ci/shared-ci.pinned
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
02385564bd29e3cc566951f7e38a1e9530846b7e
4 changes: 2 additions & 2 deletions schema/playground/collisions.schema
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package playground;

import "from_gdk_packages/com.improbable.gdk.core/common.schema";
import "improbable/gdk/core/common.schema";

component Collisions
{
id = 12009;
event improbable.common.Empty player_collided;
event improbable.gdk.core.Empty player_collided;
}
6 changes: 3 additions & 3 deletions schema/playground/cube_spawner.schema
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package playground;

import "from_gdk_packages/com.improbable.gdk.core/common.schema";
import "improbable/gdk/core/common.schema";

type DeleteCubeRequest
{
Expand All @@ -12,6 +12,6 @@ component CubeSpawner
id = 12011;
list<EntityId> spawned_cubes = 1;

command improbable.common.Empty spawn_cube(improbable.common.Empty);
command improbable.common.Empty delete_spawned_cube(DeleteCubeRequest);
command improbable.gdk.core.Empty spawn_cube(improbable.gdk.core.Empty);
command improbable.gdk.core.Empty delete_spawned_cube(DeleteCubeRequest);
}
4 changes: 2 additions & 2 deletions schema/playground/spinner_rotation.schema
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package playground;

import "from_gdk_packages/com.improbable.gdk.core/common.schema";
import "improbable/gdk/core/common.schema";

component SpinnerRotation
{
id = 12002;
command improbable.common.Empty spinner_toggle_rotation(improbable.common.Empty);
command improbable.gdk.core.Empty spinner_toggle_rotation(improbable.gdk.core.Empty);
}
6 changes: 5 additions & 1 deletion test-project/Assets/Config/GdkToolsConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
"SchemaSourceDirs": [
"Assets/.Schema"
],
"CodegenOutputDir": "Assets/Generated/Source"
"CodegenOutputDir": "Assets/Generated/Source",
"DescriptorOutputDir": "Temp/schema",
"RuntimeIp": "",
"DevAuthTokenDir": "Resources",
"DevAuthTokenLifetimeDays": 30
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.improbable.gdk.dependencytest",
"displayName": "SpatialOS GDK Dependency Test",
"version": "0.2.2",
"unity": "2018.3",
"unity": "2019.1",
"author": "Improbable Worlds Ltd",
"description": "SpatialOS GDK Dependency Test Root.",
"dependencies": {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.improbable.gdk.dependencytestchild",
"displayName": "SpatialOS GDK Dependency Test Child",
"version": "0.2.2",
"unity": "2018.3",
"unity": "2019.1",
"author": "Improbable Worlds Ltd",
"description": "SpatialOS GDK Dependency Test Child.",
"dependencies": {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.improbable.gdk.dependencytestgrandchild",
"displayName": "SpatialOS GDK Dependency Test Grandchild",
"version": "0.2.2",
"unity": "2018.3",
"unity": "2019.1",
"author": "Improbable Worlds Ltd",
"description": "SpatialOS GDK Dependency Test Grandchild.",
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions workers/unity/Assets/Config/GdkToolsConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"../../schema"
],
"CodegenOutputDir": "Assets/Generated/Source",
"DescriptorOutputDir": "../../build/assembly/schema",
"RuntimeIp": "",
"DevAuthTokenDir": "Resources",
"DevAuthTokenLifetimeDays": 30
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using Improbable;
using Improbable.Gdk.Core;
using Improbable.PlayerLifecycle;
using Improbable.Transform;
using Improbable.Gdk.PlayerLifecycle;
using Improbable.Gdk.TransformSynchronization;
using UnityEngine;
using Quaternion = Improbable.Transform.Quaternion;
using Quaternion = Improbable.Gdk.TransformSynchronization.Quaternion;

namespace Playground.Editor.SnapshotGenerator
{
Expand Down
Loading