diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7063fea --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +artifacts/** +build/** +.build_script/** +node_modules/** +.DS_Store +.npmrc +!Documentation~ +!.Documentation +npm-debug.log +build.sh.meta +build.bat.meta diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..696d110 --- /dev/null +++ b/.npmignore @@ -0,0 +1,19 @@ +artifacts/** +build/** +.build_script/** +node_modules/** +Documentation/ApiDocs/** +Documentation~/ApiDocs/** +.DS_Store +.npmrc +.npmignore +.gitignore +CONTRIBUTING.md +CONTRIBUTING.md.meta +QAReport.md +QAReport.md.meta +.gitlab-ci.yml +build.sh +build.sh.meta +build.bat +build.bat.meta diff --git a/.yamato/build.yml b/.yamato/build.yml new file mode 100644 index 0000000..c80ef5b --- /dev/null +++ b/.yamato/build.yml @@ -0,0 +1,60 @@ +editors: + - version: 2019.1 +platforms: + - name: win + type: Unity::VM + image: package-ci/win10:latest + flavor: m1.large + - name: mac + type: Unity::VM::osx + image: buildfarm/mac:stable + flavor: m1.mac +--- +{% for editor in editors %} +{% for platform in platforms %} +{{ platform.name }}_{{ editor.version }}: + name : Build and Test version {{ editor.version }} on {{ platform.name }} + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor}} + commands: + - npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm + - upm-ci package pack + - upm-ci package test --unity-version {{ editor.version }} + triggers: + branches: + only: + - master + artifacts: + UTR_Output.zip: + paths: + - "utr_output/**/*" +{% endfor %} +{% endfor %} + +run_preview_verified_staging: + name: Preview and Verified Packages to Staging + agent: + type: Unity::VM + image: package-ci/win10:latest + flavor: m1.large + name: Runner + commands: + - npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm + - upm-ci package pack + - upm-ci package publish --registry staging + triggers: + tags: + only: + - /^(v|V)[0-9].[0-9].[0-9]/ + artifacts: + Package.zip: + paths: + - "automation/package/*.tgz" + dependencies: + {% for editor in editors %} + {% for platform in platforms %} + - .yamato/build.yml#{{ platform.name }}_{{ editor.version }} + {% endfor %} + {% endfor %} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d217d94 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this package will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [0.2.0] - 2019-01-25 + +### Changed + +- Updated the Yamato CI configuration +- Moved from MIT to UCL license +- Moved menu entry under Window > Analysis + +## [0.1.0] - 2018-12-20 + +### Added + +- First release of Unity package *PlayableGraph Visualizer*. +- Mirrored the original [graph-visualizer repository](https://github.com/Unity-Technologies/graph-visualizer) and modified it to fulfill the Unity package requirements. + + +[Unreleased]: https://github.cds.internal.unity3d.com/unity/com.unity.playablegraph-visualizer/compare/v0.1.0...HEAD diff --git a/CHANGELOG.md.meta b/CHANGELOG.md.meta new file mode 100644 index 0000000..c0f3f3b --- /dev/null +++ b/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 082393007b3cfe547958d9d6f7abffd2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Documentation~/playablegraph-visualizer.md b/Documentation~/playablegraph-visualizer.md new file mode 100644 index 0000000..1711495 --- /dev/null +++ b/Documentation~/playablegraph-visualizer.md @@ -0,0 +1,38 @@ +# About PlayableGraph Visualizer + +Use the *PlayableGraph Visualizer* package to have a visual representation of the +Playable graphs instantiated in the scene. + +# Installing PlayableGraph Visualizer + +To install this package, follow the instructions in the +[Package Manager documentation](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@latest/index.html). + +# Using PlayableGraph Visualizer + +- Open the PlayableGraph Visualizer in **Window > Analysis > PlayableGraph Visualizer** +- Open any scene that contains at least one `PlayableGraph` +- In the top-left list, select the `PlayableGraph` to display in the window +- Click on the nodes to display more information about the associated Playable handle + +_Note:_ +- You can show just your `PlayableGraph` using `GraphVisualizerClient.Show(PlayableGraph)` in the code +- If your `PlayableGraph` is only available in Play mode, you will not be able to see it in Edit mode + +# Technical details + +## Requirements + +This version of *PlayableGraph Visualizer* is compatible with the following versions of the Unity Editor: + +* 2018.1 and later (recommended) + +## Package contents + +The following table indicates the structure of the package: + +|Location|Description| +|---|---| +|`Editor/`|Contains the editor scripts for the new *PlayableGraph Visualizer* window.| +|`Runtime/GraphVisualizerClient.cs`|Contains the class allowing the user to register specific Playable graphs.| + diff --git a/Editor/PlayableGraphVisualizerWindow.cs b/Editor/PlayableGraphVisualizerWindow.cs index 3bb9822..a68d693 100644 --- a/Editor/PlayableGraphVisualizerWindow.cs +++ b/Editor/PlayableGraphVisualizerWindow.cs @@ -32,7 +32,7 @@ namespace GraphVisualizer m_GraphSettings.showLegend = true; } - [MenuItem("Window/PlayableGraph Visualizer")] + [MenuItem("Window/Analysis/PlayableGraph Visualizer")] public static void ShowWindow() { GetWindow("PlayableGraph Visualizer"); diff --git a/Editor/PlayableNodes/PlayableOutputNode.cs b/Editor/PlayableNodes/PlayableOutputNode.cs index a7524b2..3d6eac3 100644 --- a/Editor/PlayableNodes/PlayableOutputNode.cs +++ b/Editor/PlayableNodes/PlayableOutputNode.cs @@ -1,6 +1,7 @@ using System; using System.Text; using UnityEngine.Playables; +using UnityEditor.Playables; namespace GraphVisualizer { diff --git a/Editor/Unity.PlayableGraphVisualizer.Editor.asmdef b/Editor/Unity.PlayableGraphVisualizer.Editor.asmdef new file mode 100644 index 0000000..3e6362f --- /dev/null +++ b/Editor/Unity.PlayableGraphVisualizer.Editor.asmdef @@ -0,0 +1,10 @@ +{ + "name": "Unity.PlayableGraphVisualizer.Editor", + "references": [ + "Unity.PlayableGraphVisualizer" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Editor/Unity.PlayableGraphVisualizer.Editor.asmdef.meta b/Editor/Unity.PlayableGraphVisualizer.Editor.asmdef.meta new file mode 100644 index 0000000..f82943b --- /dev/null +++ b/Editor/Unity.PlayableGraphVisualizer.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2702b94ed25b25fdda2226e5c974e9e8 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9de2c6f..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2018 Unity Technologies - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..fb1abc8 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,5 @@ +PlayableGraph Visualizer copyright © 2019 Unity Technologies ApS + +Licensed under the Unity Companion License for Unity-dependent projects -- see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). + +Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. diff --git a/LICENSE.meta b/LICENSE.md.meta similarity index 100% rename from LICENSE.meta rename to LICENSE.md.meta diff --git a/README.md b/README.md index 1ac5df8..74cb928 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,7 @@ # PlayableGraph Visualizer -## Introduction - The PlayableGraph Visualizer is a tool that displays the PlayableGraphs in the scene. It can be used in both Play and Edit mode and will always reflect the current state of the graph. Playable nodes are represented by colored nodes, varying according to their type. Connections color intensity indicates its weight. -## Setup - -🚨 Be careful to use a release that is compatible with your Unity version (see table below). The `master` branch is compatible with 2018.1 and later. - -There are two ways to install the PlayableGraph Visualizer: - -1. Standalone: - - Download the release compatibles with your Unity version; - - Uncompress the downloaded file in your `Assets` directory. - -2. Git (command line): - - Change directory to your project's `Assets` directory. - - Run `git clone https://github.com/Unity-Technologies/graph-visualizer` - -## Usage - -- Open the PlayableGraph Visualizer in **Window > PlayableGraph Visualizer**. -- Open any scene that contains at least one `PlayableGraph`. -- Select the `PlayableGraph` to display in the window's top-left list. -- Click on the nodes to display more information about the associated Playable Handle. - -_Note:_ -- You can show just your `PlayableGraph` using `GraphVisualizerClient.Show(PlayableGraph)` in the code. -- If your `PlayableGraph` is only available in Play mode, you will not be able to see it in Edit mode. - -## Unity compatibility - - Unity version | Release ----------------|-------------- - 2018.1+ | v2.2 (master) - 2017.1+ | v1.1 +See the [Documentation](Documentation~/playablegraph-visualizer.md) for the installation and the usage. diff --git a/Clients.meta b/Runtime.meta similarity index 100% rename from Clients.meta rename to Runtime.meta diff --git a/Clients/GraphVisualizerClient.cs b/Runtime/GraphVisualizerClient.cs similarity index 100% rename from Clients/GraphVisualizerClient.cs rename to Runtime/GraphVisualizerClient.cs diff --git a/Clients/GraphVisualizerClient.cs.meta b/Runtime/GraphVisualizerClient.cs.meta similarity index 100% rename from Clients/GraphVisualizerClient.cs.meta rename to Runtime/GraphVisualizerClient.cs.meta diff --git a/Runtime/Unity.PlayableGraphVisualizer.asmdef b/Runtime/Unity.PlayableGraphVisualizer.asmdef new file mode 100644 index 0000000..23e9207 --- /dev/null +++ b/Runtime/Unity.PlayableGraphVisualizer.asmdef @@ -0,0 +1,6 @@ +{ + "name": "Unity.PlayableGraphVisualizer", + "references": [], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Runtime/Unity.PlayableGraphVisualizer.asmdef.meta b/Runtime/Unity.PlayableGraphVisualizer.asmdef.meta new file mode 100644 index 0000000..ac7bff7 --- /dev/null +++ b/Runtime/Unity.PlayableGraphVisualizer.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d8e7b33ba1e4a89fc8a64b6b1e97a6ac +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package.json b/package.json new file mode 100644 index 0000000..8f82e87 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "com.unity.playablegraph-visualizer", + "displayName": "PlayableGraph Visualizer", + "version": "0.2.0-preview.2", + "unity": "2018.1", + "description": "The PlayableGraph Visualizer is a tool that displays the PlayableGraphs in the scene. It can be used in both Play and Edit mode and will always reflect the current state of the graph. Playable nodes are represented by colored nodes, varying according to their type. Connections color intensity indicates its weight.", + "licence": "MIT", + "author": { + "name": "Unity" + }, + "keywords": [ + "playable", + "graph", + "playablegraph", + "animation", + "timeline" + ], + "dependencies": { + } +} diff --git a/package.json.meta b/package.json.meta new file mode 100644 index 0000000..fcbae93 --- /dev/null +++ b/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 739bdc2aae9cc990f962d6c12c1f1558 +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: