Skip to content

Commit f48f901

Browse files
committed
feat(distribution): library now requires Unity Package Manager to run
BREAKING CHANGE: You now must use Unity's Package Manager to install this package. See the `### Installation` section in the README.md for full details.
1 parent 21cac18 commit f48f901

20 files changed

+9920
-15
lines changed

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false
14+
15+
[manifest.json]
16+
indent_size = 2

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
/[Oo]bj/
44
/[Bb]uild/
55
/[Bb]uilds/
6-
/Assets/AssetStoreTools*
6+
/[Ll]ogs/
7+
/[Mm]emoryCaptures/
78

89
# Visual Studio 2015 cache directory
910
/.vs/
@@ -31,3 +32,8 @@ sysinfo.txt
3132

3233
# Builds
3334
*.apk
35+
36+
# Node.js
37+
node_modules
38+
dist
39+
dist.zip

.releaserc

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
[
7+
"@semantic-release/exec",
8+
{
9+
"verifyConditionsCmd": "npm run build",
10+
"prepareCmd": "npm run build"
11+
}
12+
],
13+
"@semantic-release/git",
14+
[
15+
"@semantic-release/npm",
16+
{
17+
"pkgRoot": "dist"
18+
}
19+
],
20+
[
21+
"@semantic-release/github",
22+
{
23+
"assets": [
24+
{
25+
"path": "dist.zip",
26+
"label": "Package Build"
27+
}
28+
]
29+
}
30+
]
31+
]
32+
}

.travis.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: node_js
2+
node_js:
3+
- "node"
4+
install:
5+
- npm install
6+
script:
7+
- commitlint-travis
8+
- npm run build
9+
- npm run semantic-release
10+
deploy:
11+
- provider: script
12+
skip_cleanup: true
13+
script: bash publish-nightly.sh
14+
on:
15+
branch: develop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replaced when project is built from commit logs via Semantic Release.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Documentation beyond README.md goes here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "com.fluid.unity-animator-helpers.Editor",
3+
"references": [
4+
"com.fluid.unity-animator-helpers"
5+
],
6+
"optionalUnityReferences": [],
7+
"includePlatforms": [
8+
"Editor"
9+
],
10+
"excludePlatforms": [],
11+
"allowUnsafeCode": false
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Edit LICENSE.md in root, contents will be replaced.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Edit README.md in root, contents will be replaced.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "com.fluid.unity-animator-helpers",
3+
"references": [],
4+
"optionalUnityReferences": [],
5+
"includePlatforms": [],
6+
"excludePlatforms": []
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "com.fluid.unity-animator-helpers.Editor.Tests",
3+
"references": [
4+
"com.fluid.unity-animator-helpers",
5+
"com.fluid.unity-animator-helpers.Editor"
6+
],
7+
"optionalUnityReferences": [
8+
"TestAssemblies"
9+
],
10+
"includePlatforms": [
11+
"Editor"
12+
],
13+
"excludePlatforms": [],
14+
"allowUnsafeCode": false,
15+
"overrideReferences": false,
16+
"precompiledReferences": [],
17+
"autoReferenced": true,
18+
"defineConstraints": []
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "com.fluid.unity-animator-helpers.Tests",
3+
"references": [
4+
"com.fluid.unity-animator-helpers"
5+
],
6+
"optionalUnityReferences": [
7+
"TestAssemblies"
8+
],
9+
"includePlatforms": [],
10+
"excludePlatforms": [],
11+
"allowUnsafeCode": false,
12+
"overrideReferences": false,
13+
"precompiledReferences": [],
14+
"autoReferenced": true,
15+
"defineConstraints": []
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "com.fluid.unity-animator-helpers",
3+
"version": "0.0.0",
4+
"displayName": "Unity Animator Helpers",
5+
"description": "A set of Animator helper scripts to better streamline and handle animation playback",
6+
"unity": "2019.1"
7+
}

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Ash Blue
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+67-14
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ Ever had to handle complex animations that require multiple frames such as jump,
77
* Wait for multiple animator variable changes from a coroutine or loop
88
* Pre-made library of common Animator Behaviors for visually programming the Animator with variable changes and randomization
99

10-
## Quick Start Guide
11-
12-
Grab the export package and import it into your Unity project
13-
[Assets/Dist/AdncAnimatorHelpers.unitypackage](/Assets/Dist/AdncAnimatorHelpers.unitypackage)
10+
## Quickstart
1411

1512
### AnimatorPlayback Objects
1613

@@ -56,30 +53,82 @@ public class AnimatorPlaybackExample : MonoBehaviour {
5653
Note that the AnimatorPlayback objects are fully unit and runtime tested
5754
due to their level of complexity.
5855

59-
### Features
56+
#### Features
6057

6158
* AnimatorPlayback objects to easily detect animation completion conditions
6259
* Pre-built library on AnimatorBehavior(s) for complex animation playback
6360
* Animator extensions that add missing functionality to Unity's Animator component
6461
* Animator unit testing helper (for editor only tests)
6562
* Unit tested
6663

67-
#### Requesting Features
64+
### Installation
65+
66+
Unity Animator Helpers is used through [Unity's Package Manager](https://docs.unity3d.com/Manual/CustomPackages.html). In order to use it you'll need to add the following lines to your `Packages/manifest.json` file. After that you'll be able to visually control what specific version of Unity Animator Helpers you're using from the package manager window in Unity. This has to be done so your Unity editor can connect to NPM's package registry.
67+
68+
```json
69+
{
70+
"scopedRegistries": [
71+
{
72+
"name": "NPM",
73+
"url": "https://registry.npmjs.org",
74+
"scopes": [
75+
"com.fluid"
76+
]
77+
}
78+
],
79+
"dependencies": {
80+
"com.fluid.unity-animator-helpers": "2.0.0"
81+
}
82+
}
83+
```
84+
85+
### Releases
6886

69-
Please file a GitHub [issue ticket](https://github.com/ashblue/unity-animator-helpers/issues) if you'd like to
70-
request a feature.
87+
Archives of specific versions and release notes are available on the [releases page](https://github.com/ashblue/unity-animator-helpers/releases).
88+
89+
#### Nightly Builds
90+
91+
To access nightly builds of the `develop` branch that are package manager friendly, you'll need to manually edit your `Packages/manifest.json` as so.
92+
93+
```json
94+
{
95+
"dependencies": {
96+
"com.fluid.unity-animator-helpers": "https://github.com/ashblue/unity-animator-helpers.git#nightly"
97+
}
98+
}
99+
```
71100

72-
You can view the current [roadmap here](https://github.com/ashblue/unity-animator-helpers/projects/1).
101+
Note that to get a newer nightly build you must delete this line and any related lock data in the manifest, let Unity rebuild, then add it back. As Unity locks the commit hash for Git urls as packages.
73102

74-
## Animator Behaviors
103+
### Development Environment
104+
105+
If you wish to run to run the development environment you'll need to install the latest [node.js](https://nodejs.org/en/). Then run the following from the root once.
106+
107+
`npm install`
108+
109+
If you wish to create a build run `npm run build` from the root and it will populate the `dist` folder.
110+
111+
#### Making Commits
112+
113+
All commits should be made using [Commitizen](https://github.com/commitizen/cz-cli) (which is automatically installed when running `npm install`). Commits are automatically compiled to version numbers on release so this is very important. PRs that don't have Commitizen based commits will be rejected.
114+
115+
To make a commit type the following into a terminal from the root
116+
117+
```bash
118+
npm run commit
119+
```
120+
121+
## Other Helper Libraries
122+
123+
### Animator Behaviors
75124

76125
There are several animator helper scripts to assist you with Animator Behavior(s).
77126
These are aimed at allowing you to interact with the Animator without having to write
78127
additional scripts to tweak variables and playback.
79128

80129
![Preview of Playback Helper](/animator-helpers.png)
81130

82-
### Available Helpers
131+
#### Available Helpers
83132

84133
Here is a brief list of helpers. New ones will be added as the repo is updated over time.
85134

@@ -94,7 +143,7 @@ Here is a brief list of helpers. New ones will be added as the repo is updated o
94143

95144
See documentation on methods (in code) for complete details.
96145

97-
## Animator Extensions
146+
### Animator Extensions
98147

99148
Unity Animator Helpers extends the pre-existing functionality of Unity3D's built in `Animator` component with static
100149
extensions. This doesn't hurt or break any existing functionality. For example you could do the following to check if
@@ -114,7 +163,7 @@ public class AnimatorExtensionExample : MonoBehaviour {
114163
}
115164
```
116165

117-
### Available Animator extensions
166+
#### Available Animator extensions
118167

119168
* HasParameter(name)
120169
* HasBool(name)
@@ -131,7 +180,7 @@ You may need to call `AnimatorHelperRuntime.Instance.Cache(Animator)` on `Start`
131180
have over 300 parameters. Please note that your `AnimatorController` object (what you pass into the Animator via
132181
inspector) must be uniquely named in order for the caching to work correctly.
133182

134-
## Animator Unit Test Helper
183+
### Animator Unit Test Helper
135184

136185
This library provides an `AnimatorStub` (editor only) class that makes testing animations via pure code super simple.
137186
All you need to do is the following.
@@ -169,3 +218,7 @@ public class TestAnimatorStub {
169218
}
170219
}
171220
```
221+
222+
---
223+
224+
This project was generated with [Oyster Package Generator](https://github.com/ashblue/oyster-package-generator).

build.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const createDist = require('upm-package-populator');
2+
3+
createDist('Assets/com.fluid.unity-animator-helpers', '.', 'dist');

commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@commitlint/config-conventional']};

0 commit comments

Comments
 (0)