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

Commit 402f53a

Browse files
author
Paul Balaji
authored
No more schema copying (#953)
1 parent 124fb22 commit 402f53a

File tree

103 files changed

+345
-1448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+345
-1448
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ workers/unity/Assets/Generated/Source/**/*.*
4444
workers/unity/Assets/Plugins/Improbable/
4545
workers/unity/Assets/Plugins/Improbable.meta
4646

47-
# Schema from Unity Package Manager Packages (Copied via tools/CopySchema)
48-
schema/from_gdk_packages
4947
_ReSharper.Caches
5048

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

51+
# Jetbrains
52+
workers/unity/Assets/Plugins/Editor/Jetbrains
53+
workers/unity/Assets/Plugins/Editor/Jetbrains.meta
5354

5455
# Test project.
5556
/test-project/build

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## Unreleased
44

5+
### Breaking Changes
6+
7+
- Schema from packages are no longer copied into the root `schema` directory.
8+
- Renamed the `Schema` directory within packages to `.schema`, to avoid generating unecessary `.meta` files.
9+
- Update feature module schema to the correct namespaces and folders within `.schema`.
10+
- If you use schema that imports from GDK packages, you will need to change how you import GDK schema.
11+
- Schema file Y in package `improbable.gdk.X` is imported using `import "improbable/gdk/X/Y.schema"`.
12+
- For example, `import "from_gdk_packages/com.improbable.gdk.core/common.schema";` now becomes `import "improbable/gdk/core/common.schema";`.
13+
514
### Changed
615

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

1524
### Breaking Changes
25+
1626
- Removed the `Improbable.Gdk.Mobile.Android` and `Improbable.Gdk.Mobile.iOS` packages. All functionality is now available inside the `Improbable.Gdk.Mobile` package.
1727

1828
### Added

ci/bootstrap.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@ cd "$(dirname "$0")/../"
55

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

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

1112
if [[ -d "${SHARED_CI_DIR}" ]]; then
1213
rm -rf "${SHARED_CI_DIR}"
1314
fi
1415

15-
git clone --verbose --depth 1 "${CLONE_URL}" "${SHARED_CI_DIR}"
16+
mkdir "${SHARED_CI_DIR}"
17+
18+
# Workaround for being unable to clone a specific commit with depth of 1.
19+
pushd "${SHARED_CI_DIR}"
20+
git init
21+
git remote add origin "${CLONE_URL}"
22+
git fetch --depth 20 origin master
23+
git checkout "${PINNED_SHARED_CI_VERSION}"
24+
popd

ci/shared-ci.pinned

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
02385564bd29e3cc566951f7e38a1e9530846b7e
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package playground;
22

3-
import "from_gdk_packages/com.improbable.gdk.core/common.schema";
3+
import "improbable/gdk/core/common.schema";
44

55
component Collisions
66
{
77
id = 12009;
8-
event improbable.common.Empty player_collided;
8+
event improbable.gdk.core.Empty player_collided;
99
}

schema/playground/cube_spawner.schema

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package playground;
22

3-
import "from_gdk_packages/com.improbable.gdk.core/common.schema";
3+
import "improbable/gdk/core/common.schema";
44

55
type DeleteCubeRequest
66
{
@@ -12,6 +12,6 @@ component CubeSpawner
1212
id = 12011;
1313
list<EntityId> spawned_cubes = 1;
1414

15-
command improbable.common.Empty spawn_cube(improbable.common.Empty);
16-
command improbable.common.Empty delete_spawned_cube(DeleteCubeRequest);
15+
command improbable.gdk.core.Empty spawn_cube(improbable.gdk.core.Empty);
16+
command improbable.gdk.core.Empty delete_spawned_cube(DeleteCubeRequest);
1717
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package playground;
22

3-
import "from_gdk_packages/com.improbable.gdk.core/common.schema";
3+
import "improbable/gdk/core/common.schema";
44

55
component SpinnerRotation
66
{
77
id = 12002;
8-
command improbable.common.Empty spinner_toggle_rotation(improbable.common.Empty);
8+
command improbable.gdk.core.Empty spinner_toggle_rotation(improbable.gdk.core.Empty);
99
}

test-project/Assets/Config/GdkToolsConfiguration.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
"SchemaSourceDirs": [
44
"Assets/.Schema"
55
],
6-
"CodegenOutputDir": "Assets/Generated/Source"
6+
"CodegenOutputDir": "Assets/Generated/Source",
7+
"DescriptorOutputDir": "Temp/schema",
8+
"RuntimeIp": "",
9+
"DevAuthTokenDir": "Resources",
10+
"DevAuthTokenLifetimeDays": 30
711
}

test-project/Packages/com.improbable.gdk.dependencytest/Schema.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)