v2.1.0 🚀

This commit is contained in:
AdamRamberg 2019-11-28 19:35:59 +01:00
parent be6a479bc1
commit b51de335e0
20 changed files with 265 additions and 86 deletions

View File

@ -8,6 +8,8 @@
# [Unreleased]
# 2.1.0 (November 28, 2019)
## 🐛 Bug fixes
- [#91](https://github.com/AdamRamberg/unity-atoms/issues/91) Name OnTriggerHook class properly. ([@AdamRamberg](https://github.com/AdamRamberg))
@ -20,6 +22,7 @@
## 🚀 New features
- [#78](https://github.com/AdamRamberg/unity-atoms/pull/78) Setter to AtomReference's Value was added. ([@Saso222](https://github.com/Saso222), [@soraphis](https://github.com/soraphis))
- [#86](https://github.com/AdamRamberg/unity-atoms/pull/86) Parameterless AtomListener and AtomEvent. ([@IceTrooper](https://github.com/IceTrooper), [@soraphis](https://github.com/soraphis))
## 💅 Polish

View File

@ -4,7 +4,7 @@ _Here is a check list for publishing a new version:_
- [] Checkout the canary branch and make sure `CHANGELOG.md` is up to date.
- [] Update the version number in all `package.json` files (on the root and in all the `Packages/<PackageName>/package.json`)
- [] Update the root `READMME.md` file with the correct version. Also update the version in `docs/introduction/quick-start.md`.
- [] Update the root `README.md` file with the correct version. Also update the version in `docs/introduction/quick-start.md`.
- [] From the root run `npm run generate:docs` to make sure all API documentation is up to date.
- [] Commit and push your changes to the canary branch.
- [] Merge the canary branch into the master branch.

View File

@ -63,9 +63,9 @@ namespace UnityAtoms.Editor
Debug.LogWarning("Cancelled generating Atoms.");
return;
}
#if UNITY_EDITOR
Runtime.IsUnityAtomsRepo = i == 0;
#endif
List<AtomType> ALL_ATOM_TYPES = new List<AtomType>()
{
AtomTypes.ACTION,

View File

@ -123,7 +123,7 @@ namespace UnityAtoms
/// <summary>
/// Copies the entire List to a compatible one-dimensional array, starting at the specified index of the target array.
/// </summary>
/// <param name="array">The one-dimensional Array that is the destination of the elements copied from List. The Array must have zero-based indexing.
/// <param name="array">The one-dimensional Array that is the destination of the elements copied from List. The Array must have zero-based indexing.</param>
/// <param name="arrayIndex">The zero-based index in `array` at which copying begins.</param>
public void CopyTo(T[] array, int arrayIndex)
{

View File

@ -1,7 +1,7 @@
{
"name": "com.mambojambostudios.unity-atoms-core",
"displayName": "Unity Atoms Core",
"version": "2.0.0",
"version": "2.1.0",
"unity": "2019.1",
"description": "Tiny modular pieces utilizing the power of Scriptable Objects",
"keywords": [

View File

@ -1,7 +1,7 @@
{
"name": "com.mambojambostudios.unity-atoms-mobile",
"displayName": "Unity Atoms Mobile",
"version": "2.0.0",
"version": "2.1.0",
"unity": "2019.1",
"description": "Unity Atoms for your mobile project.",
"keywords": [
@ -18,6 +18,6 @@
"/Editor.meta"
],
"dependencies": {
"com.mambojambostudios.unity-atoms-core": "2.0.0"
"com.mambojambostudios.unity-atoms-core": "2.1.0"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.mambojambostudios.unity-atoms-mono-hooks",
"displayName": "Unity Atoms Mono Hooks",
"version": "2.0.0",
"version": "2.1.0",
"unity": "2019.1",
"description": "Hook into Unity's lifecycle methods with Atom Events.",
"keywords": [
@ -18,6 +18,6 @@
"/Documentation.meta"
],
"dependencies": {
"com.mambojambostudios.unity-atoms-core": "2.0.0"
"com.mambojambostudios.unity-atoms-core": "2.1.0"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.mambojambostudios.unity-atoms-scene-mgmt",
"displayName": "Unity Atoms Scene Mgmt",
"version": "2.0.0",
"version": "2.1.0",
"unity": "2019.1",
"description": "Unity Atoms to manage your scenes.",
"keywords": [
@ -20,6 +20,6 @@
"/Documentation.meta"
],
"dependencies": {
"com.mambojambostudios.unity-atoms-core": "2.0.0"
"com.mambojambostudios.unity-atoms-core": "2.1.0"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.mambojambostudios.unity-atoms-tags",
"displayName": "Unity Atoms Tags",
"version": "2.0.0",
"version": "2.1.0",
"unity": "2019.1",
"description": "A replacement to Unity´s tags based on Unity Atoms.",
"keywords": [
@ -18,6 +18,6 @@
"/Documentation.meta"
],
"dependencies": {
"com.mambojambostudios.unity-atoms-core": "2.0.0"
"com.mambojambostudios.unity-atoms-core": "2.1.0"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.mambojambostudios.unity-atoms-ui",
"displayName": "Unity Atoms UI",
"version": "2.0.0",
"version": "2.1.0",
"unity": "2019.1",
"description": "UI system using Unity Atoms.",
"keywords": [
@ -18,6 +18,6 @@
"/Documentation.meta"
],
"dependencies": {
"com.mambojambostudios.unity-atoms-core": "2.0.0"
"com.mambojambostudios.unity-atoms-core": "2.1.0"
}
}

View File

@ -4,7 +4,7 @@ _Tiny modular pieces utilizing the power of Scriptable Objects_
## Influences
Unity Atoms is derrived from and a continuation of Ryan Hipple's [talk](https://www.youtube.com/watch?v=raQ3iHhE_Kk&t=2787s) from Unite 2017. The original source code can be found [here](https://github.com/roboryantron/Unite2017).
Unity Atoms is derived from and a continuation of Ryan Hipple's [talk](https://www.youtube.com/watch?v=raQ3iHhE_Kk&t=2787s) from Unite 2017. The original source code can be found [here](https://github.com/roboryantron/Unite2017).
[This](https://www.youtube.com/watch?v=6vmRwLYWNRo&t=738s) talk by Richard Fine is a forerunner to Ryan Hipple's talk during Unite 2016.
@ -42,12 +42,12 @@ Add the following to your `manifest.json`:
],
"dependencies": {
...
"com.mambojambostudios.unity-atoms-core": "2.0.0",
"com.mambojambostudios.unity-atoms-mobile": "2.0.0",
"com.mambojambostudios.unity-atoms-mono-hooks": "2.0.0",
"com.mambojambostudios.unity-atoms-tags": "2.0.0",
"com.mambojambostudios.unity-atoms-scene-mgmt": "2.0.0",
"com.mambojambostudios.unity-atoms-ui": "2.0.0",
"com.mambojambostudios.unity-atoms-core": "2.1.0",
"com.mambojambostudios.unity-atoms-mobile": "2.1.0",
"com.mambojambostudios.unity-atoms-mono-hooks": "2.1.0",
"com.mambojambostudios.unity-atoms-tags": "2.1.0",
"com.mambojambostudios.unity-atoms-scene-mgmt": "2.1.0",
"com.mambojambostudios.unity-atoms-ui": "2.1.0",
...
}
}

View File

@ -340,6 +340,12 @@ Custom editor for Events. Adds the possiblity to raise an Event from Unity's Ins
---
## `AtomVariableEditor`
Custom editor for Variables. Provides a better user workflow and indicates when which variables can be edited
---
## `BoolEventEditor`
Event property drawer of type `bool`. Inherits from `AtomEventEditor<bool, BoolEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
@ -406,6 +412,66 @@ Event property drawer of type `Void`. Inherits from `AtomEventEditor<Void, VoidE
---
## `BoolVariableEditor`
Variable Inspector of type `bool`. Inherits from `AtomVariableEditor`
---
## `Collider2DVariableEditor`
Variable Inspector of type `Collider2D`. Inherits from `AtomVariableEditor`
---
## `ColliderVariableEditor`
Variable Inspector of type `Collider`. Inherits from `AtomVariableEditor`
---
## `ColorVariableEditor`
Variable Inspector of type `Color`. Inherits from `AtomVariableEditor`
---
## `FloatVariableEditor`
Variable Inspector of type `float`. Inherits from `AtomVariableEditor`
---
## `GameObjectVariableEditor`
Variable Inspector of type `GameObject`. Inherits from `AtomVariableEditor`
---
## `IntVariableEditor`
Variable Inspector of type `int`. Inherits from `AtomVariableEditor`
---
## `StringVariableEditor`
Variable Inspector of type `string`. Inherits from `AtomVariableEditor`
---
## `Vector2VariableEditor`
Variable Inspector of type `Vector2`. Inherits from `AtomVariableEditor`
---
## `Vector3VariableEditor`
Variable Inspector of type `Vector3`. Inherits from `AtomVariableEditor`
---
## `AtomType`
Internal module class that holds that regarding an Atom type.

View File

@ -113,13 +113,31 @@ The string repeated X amount of times.
---
## `AtomAction`
Base abstract class for Actions. Inherits from `BaseAtom`.
### Variables
#### `ActionNoValue`
The actual Action.
### Methods
#### `Do`
Perform the Action.
---
## `AtomAction<T1>`
#### Type Parameters
- `T1` - The type for this Action.
Generic abstract base class for Actions. Inherits from `BaseAtom`.
Generic abstract base class for Actions. Inherits from `AtomAction`.
### Variables
@ -146,7 +164,7 @@ Perform the Action.
- `T1` - The first type for this Action.
- `T2` - The second type for this Action.
Generic abstract base class for Actions. Inherits from `BaseAtom`.
Generic abstract base class for Actions. Inherits from `AtomAction`.
### Variables
@ -175,7 +193,7 @@ Perform the Action.
- `T2` - The second type for this Action.
- `T3` - The third type for this Action.
Generic abstract base class for Actions. Inherits from `BaseAtom`.
Generic abstract base class for Actions. Inherits from `AtomAction`.
### Variables
@ -206,7 +224,7 @@ Perform the Action.
- `T3` - The third type for this Action.
- `T4` - The fourth type for this Action.
Generic abstract base class for Actions. Inherits from `BaseAtom`.
Generic abstract base class for Actions. Inherits from `AtomAction`.
### Variables
@ -239,7 +257,7 @@ Perform the Action.
- `T4` - The fourth type for this Action.
- `T5` - The fifth type for this Action.
Generic abstract base class for Actions. Inherits from `BaseAtom`.
Generic abstract base class for Actions. Inherits from `AtomAction`.
### Variables
@ -399,12 +417,6 @@ Do the Action.
---
#### `Do`
Do the Action.
---
## `SetBoolVariableValue`
Set variable value Action of type `bool`. Inherits from `SetVariableValue<bool, BoolVariable, BoolConstant, BoolReference, BoolEvent, BoolBoolEvent>`.
@ -602,6 +614,26 @@ Unregister handler that was registered using the `Register` method.
---
#### `RegisterListener(UnityAtoms.IAtomListener)`
Register a Listener that in turn trigger all its associated handlers when the Event triggers.
##### Parameters
- `listener` - The Listener to register.
---
#### `UnregisterListener(UnityAtoms.IAtomListener)`
Unregister a listener that was registered using the `RegisterListener` method.
##### Parameters
- `listener` - The Listener to unregister.
---
## `AtomEvent<T>`
#### Type Parameters
@ -648,7 +680,7 @@ Register a Listener that in turn trigger all its associated handlers when the Ev
##### Parameters
- `listener` - The Listenr to register.
- `listener` - The Listener to register.
---
@ -658,7 +690,7 @@ Unregister a listener that was registered using the `RegisterListener` method.
##### Parameters
- `listener` - The Listenr to unregister.
- `listener` - The Listener to unregister.
---
@ -720,7 +752,7 @@ Register a Listener that in turn trigger all its associated handlers when the Ev
##### Parameters
- `listener` - The Listenr to register.
- `listener` - The Listener to register.
---
@ -730,7 +762,7 @@ Unregister a listener that was registered using the `RegisterListener` method.
##### Parameters
- `listener` - The Listenr to unregister.
- `listener` - The Listener to unregister.
---
@ -1163,16 +1195,9 @@ An `AtomFunction<R, T1, T2, T3, T4, T5>`.
---
## `AtomListener<T,A,E,UER>`
## `AtomListener`
#### Type Parameters
- `T` - The type that we are listening for.
- `A` - Acion of type `AtomAction<T>`.
- `E` - Event of type `AtomEvent<T>`.
- `UER` - Unity Event of type `UnityEvent<T>`.
Generic base class for Listeners. Inherits from `BaseAtomListener` and `IAtomListener<T>`.
The most basic Listener. Can use every type of AtomEvent but doesn't support its value. Inherits from `BaseAtomListener` and implements `IAtomListener`.
### Variables
@ -1196,7 +1221,50 @@ The Action responses;
#### `Event`
The Event we are listening for as a proeprty.
The Event we are listening for as a property.
### Methods
#### `OnEventRaised`
Handler for when the Event gets raised.
---
## `AtomListener<T,A,E,UER>`
#### Type Parameters
- `T` - The type that we are listening for.
- `A` - Acion of type `AtomAction<T>`.
- `E` - Event of type `AtomEvent<T>`.
- `UER` - Unity Event of type `UnityEvent<T>`.
Generic base class for Listeners. Inherits from `BaseAtomListener` and implements `IAtomListener<T>`.
### Variables
#### `_event`
The Event that we are listening to.
---
#### `_unityEventResponse`
The Unity Event responses. NOTE: This variable is public due to this bug: https://issuetracker.unity3d.com/issues/events-generated-by-the-player-input-component-do-not-have-callbackcontext-set-as-their-parameter-type. Will be changed back to private when fixed (this could happen in a none major update).
---
#### `_actionResponses`
The Action responses;
### Properties
#### `Event`
The Event we are listening for as a property.
### Methods
@ -1210,6 +1278,12 @@ Handler for when the Event gets raised.
---
#### `DebugLog(`0)`
Helper to regiser as listener callback
---
## `AtomListener<T1,T2,A,E,UER>`
#### Type Parameters
@ -1220,7 +1294,7 @@ Handler for when the Event gets raised.
- `E` - Event of type `AtomEvent<T1, T2>`.
- `UER` - Unity Event of type `UnityEvent<T1, T2>`.
Generic base class for Listeners. Inherits from `BaseAtomListener` and `IAtomListener<T1, T2>`
Generic base class for Listeners. Inherits from `BaseAtomListener` and implements `IAtomListener<T1, T2>`
### Variables
@ -1244,7 +1318,7 @@ The Action responses;
#### `Event`
The Event we are listening for as a proeprty.
The Event we are listening for as a property.
### Methods
@ -1259,6 +1333,12 @@ Handler for when the Event gets raised.
---
#### `DebugLog(`0,`1)`
Helper to regiser as listener callback
---
## `BaseAtomListener`
None generic base class for all Listeners.
@ -1502,6 +1582,17 @@ The item if it exists.
---
#### `CopyTo(array,arrayIndex)`
Copies the entire List to a compatible one-dimensional array, starting at the specified index of the target array.
##### Parameters
- `array` - The one-dimensional Array that is the destination of the elements copied from List. The Array must have zero-based indexing.
- `arrayIndex` - The zero-based index in `array` at which copying begins.
---
#### `GetEnumerator`
Get an `IEnumerator<T>` of the list.

View File

@ -42,3 +42,9 @@ Variable property drawer of type `TouchUserInput`. Inherits from `AtomDrawer<Tou
Event property drawer of type `TouchUserInput`. Inherits from `AtomEventEditor<TouchUserInput, TouchUserInputEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputVariableEditor`
Variable Inspector of type `TouchUserInput`. Inherits from `AtomVariableEditor`
---

View File

@ -152,7 +152,7 @@ Set to true if Event should be triggered on `OnTriggerStay2D`
---
## `OnTriggerStayHook`
## `OnTriggerHook`
Mono Hook for [`OnTriggerEnter`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerEnter.html), [`OnTriggerExit`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerExit.html) and [`OnTriggerStay`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerStay.html)

View File

@ -48,3 +48,9 @@ Variable property drawer of type `SceneField`. Inherits from `AtomDrawer<SceneFi
Event property drawer of type `SceneField`. Inherits from `AtomEventEditor<SceneField, SceneFieldEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldVariableEditor`
Variable Inspector of type `SceneField`. Inherits from `AtomVariableEditor`
---

View File

@ -33,12 +33,12 @@ Add the following to your `manifest.json`:
],
"dependencies": {
...
"com.mambojambostudios.unity-atoms-core": "2.0.0",
"com.mambojambostudios.unity-atoms-mobile": "2.0.0",
"com.mambojambostudios.unity-atoms-mono-hooks": "2.0.0",
"com.mambojambostudios.unity-atoms-tags": "2.0.0",
"com.mambojambostudios.unity-atoms-scene-mgmt": "2.0.0",
"com.mambojambostudios.unity-atoms-ui": "2.0.0",
"com.mambojambostudios.unity-atoms-core": "2.1.0",
"com.mambojambostudios.unity-atoms-mobile": "2.1.0",
"com.mambojambostudios.unity-atoms-mono-hooks": "2.1.0",
"com.mambojambostudios.unity-atoms-tags": "2.1.0",
"com.mambojambostudios.unity-atoms-scene-mgmt": "2.1.0",
"com.mambojambostudios.unity-atoms-ui": "2.1.0",
...
}
}

52
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "com.mambojambostudios.unity-atoms",
"version": "2.0.0",
"version": "2.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -95,27 +95,27 @@
"dev": true
},
"es-abstract": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.15.0.tgz",
"integrity": "sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ==",
"version": "1.16.2",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.2.tgz",
"integrity": "sha512-jYo/J8XU2emLXl3OLwfwtuFfuF2w6DYPs+xy9ZfVyPkDcrauu6LYrw/q2TyCtrbc/KUdCiC5e9UajRhgNkVopA==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.0",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.0",
"has-symbols": "^1.0.1",
"is-callable": "^1.1.4",
"is-regex": "^1.0.4",
"object-inspect": "^1.6.0",
"object-inspect": "^1.7.0",
"object-keys": "^1.1.1",
"string.prototype.trimleft": "^2.1.0",
"string.prototype.trimright": "^2.1.0"
}
},
"es-to-primitive": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
"integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
"dev": true,
"requires": {
"is-callable": "^1.1.4",
@ -151,9 +151,9 @@
"dev": true
},
"glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@ -174,9 +174,9 @@
}
},
"has-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
"dev": true
},
"inflight": {
@ -223,12 +223,12 @@
}
},
"is-symbol": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
"integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
"integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
"dev": true,
"requires": {
"has-symbols": "^1.0.0"
"has-symbols": "^1.0.1"
}
},
"locate-path": {
@ -251,9 +251,9 @@
}
},
"object-inspect": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
"integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
"integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
"dev": true
},
"object-keys": {
@ -447,9 +447,9 @@
"dev": true
},
"yargs": {
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.0.tgz",
"integrity": "sha512-/is78VKbKs70bVZH7w4YaZea6xcJWOAwkhbR0CFuZBmYtfTYF0xjGJF43AYd8g2Uii1yJwmS5GR2vBmrc32sbg==",
"version": "14.2.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.2.tgz",
"integrity": "sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA==",
"dev": true,
"requires": {
"cliui": "^5.0.0",

View File

@ -1,7 +1,7 @@
{
"name": "com.mambojambostudios.unity-atoms",
"displayName": "Unity Atoms",
"version": "2.0.0",
"version": "2.1.0",
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},

View File

@ -19,13 +19,20 @@ const run = async () => {
}
});
const packages = ['Tags'];
// Compile code
const apiXmlName = `api.xml`;
const assemblyName = `Packages.dll`;
const cmd = `csc -recurse:${path.join(process.cwd(), 'Packages', '/*.cs')} /doc:${path.join(process.cwd(), apiXmlName)} -t:library -out:${path.join(process.cwd(), assemblyName)} -r:${dlls.join(',')} -define:UNITY_2019_1_OR_NEWER`;
const compileStdout = child_process.execSync(cmd);
try {
const compileStdout = child_process.execSync(cmd);
} catch(e) {
console.error(e.status);
console.error(e.message);
console.error(e.stderr.toString());
console.error(e.stdout.toString());
process.exit(1);
}
if (argv.verbose) {
console.log("Stdout from source code compilation:");
console.log(compileStdout.toString());