Browse Source

Fixed misc selection box issues

- Selection box no longer appears when using the pan tool
- Zoom is locked when selecting with the selection box (seems buggy
otherwise)
- Removed potentially confusing index from “Node Position” undo name
master
Zach Vinless 8 years ago
parent
commit
9379feed33
  1. 7
      Assets/Fungus/Scripts/Editor/FlowchartWindow.cs
  2. 12
      Assets/New Animator Controller.controller
  3. 8
      Assets/New Animator Controller.controller.meta
  4. 9
      Assets/VSCode.meta
  5. BIN
      Assets/VSCode/HOWTO.pdf
  6. 8
      Assets/VSCode/HOWTO.pdf.meta
  7. 22
      Assets/VSCode/LICENSE
  8. 8
      Assets/VSCode/LICENSE.meta
  9. 9
      Assets/VSCode/Plugins.meta
  10. 9
      Assets/VSCode/Plugins/Editor.meta
  11. 1304
      Assets/VSCode/Plugins/Editor/VSCode.cs
  12. 12
      Assets/VSCode/Plugins/Editor/VSCode.cs.meta
  13. 37
      Assets/VSCode/README.md
  14. 8
      Assets/VSCode/README.md.meta

7
Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

@ -312,7 +312,7 @@ namespace Fungus.EditorUtils
block._NodeRect = tempRect; block._NodeRect = tempRect;
Undo.RecordObject(block, "Node Position " + i); Undo.RecordObject(block, "Node Position");
tempRect.x = newPos.x; tempRect.x = newPos.x;
tempRect.y = newPos.y; tempRect.y = newPos.y;
@ -464,7 +464,8 @@ namespace Fungus.EditorUtils
protected virtual void HandleSelectionBox(Flowchart flowchart) protected virtual void HandleSelectionBox(Flowchart flowchart)
{ {
if (Event.current.button == 0 && Event.current.modifiers != EventModifiers.Alt) if (Event.current.button == 0 && Event.current.modifiers != EventModifiers.Alt &&
!(UnityEditor.Tools.current == Tool.View && UnityEditor.Tools.viewTool == ViewTool.Pan))
{ {
switch (Event.current.type) switch (Event.current.type)
{ {
@ -578,7 +579,7 @@ namespace Fungus.EditorUtils
zoom = true; zoom = true;
} }
if (zoom) if (zoom && selectionBox.size == Vector2.zero)
{ {
flowchart.Zoom -= Event.current.delta.y * 0.01f; flowchart.Zoom -= Event.current.delta.y * 0.01f;
flowchart.Zoom = Mathf.Clamp(flowchart.Zoom, minZoomValue, maxZoomValue); flowchart.Zoom = Mathf.Clamp(flowchart.Zoom, minZoomValue, maxZoomValue);

12
Assets/New Animator Controller.controller

@ -0,0 +1,12 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: New Animator Controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers: []
m_MultiThreadedStateMachine: 1

8
Assets/New Animator Controller.controller.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a5dab9bd0111248c897b67ddef5ee675
timeCreated: 1478062001
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/VSCode.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6f60a9bceb41e41d292fc16cc056d6d5
folderAsset: yes
timeCreated: 1477762468
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/VSCode/HOWTO.pdf

Binary file not shown.

8
Assets/VSCode/HOWTO.pdf.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9519be3d5789b4c5ca14e07b375d6884
timeCreated: 1444651605
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

22
Assets/VSCode/LICENSE

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2016 dotBunny Inc.
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.

8
Assets/VSCode/LICENSE.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: edc517f07ba5e4cf9984f8753de7388f
timeCreated: 1444651605
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/VSCode/Plugins.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0d0aa2ea87e4246f3b7fd58b757ff82c
folderAsset: yes
timeCreated: 1444652904
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/VSCode/Plugins/Editor.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 47b6573edc17b4b19b6f06515ff01748
folderAsset: yes
timeCreated: 1444652910
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

1304
Assets/VSCode/Plugins/Editor/VSCode.cs

File diff suppressed because it is too large Load Diff

12
Assets/VSCode/Plugins/Editor/VSCode.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c34beeaf0d4cf44c49f1039006a08591
timeCreated: 1444653497
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

37
Assets/VSCode/README.md

@ -0,0 +1,37 @@
# VSCode
> Seamless Visual Studio Code Integration in Unity - As seen in the [Visual Studio Code documentation!](https://code.visualstudio.com/Docs/runtimes/unity)
### Requirements
##### Unity > 4.5 && Unity < 5.5
I am not sure exactly where in the 4.x cycle some of the features I'm using were introduced, but I'm guessing its around the 4.5+ mark. I've checked with the latest 4.5.0f6 release. Unity has also committed to having full support for Code when Unity 5.5 drops. So at that point all bets are off for the usefulness of this plugin. Like our MonoDevelop.Unity plugin of past, Unity catches up eventually.
#####Visual Studio Code 0.10.1+
Get the [latest version](https://code.visualstudio.com), or have a look at the past releases of the VSCode [plugin](https://github.com/dotBunny/VSCode/releases/tag/1.6.5) for support for your version.
######Mono
A good number of people have needed to install Mono in order for many of the issues with OmniSharp to be resolved.
I would suggest installing the latest package available at the [Mono Project](http://www.mono-project.com/download/). Don't worry it will not mess with Unity.
### Installation
It is important to make sure that the `VSCode.cs` file is placed under an `Editor` folder in the project. An example of this arrangement would be placing the file in `/Assets/Plugins/Editor/VSCode.cs`. By default it has its own folder structure which does this for you.
### Unity Asset Store Package
A UAS packaged version of the plugin is [available](http://u3d.as/jmM) for your consumption.
### Usage
Once the VSCode file is in place, simply navigate your way to the `Unity Preferences` and select `VSCode` and check the `Enable Integration` option.
That's it! Your ready to go!
OK, so maybe some people need a little video explaining some of the finer details of how to use the plugin. So I shot a [quick video](https://vimeo.com/dotbunny/vscode) that highlights the ups and the downs (like Unity hanging after debugging sometimes) for people to watch. Please note this video is from a previous version of the plugin where things are in the menu, this has changed since then.
### Platform Support
I use the plugin every day on a Mac (so it's battle tested there), and occasionally test it on a Windows VM. As for the recently announced Linux support, it should work just like the Mac version. I'll get around to installing the Linux editor sometime in the near future.
The Windows version of Visual Studio Code currently does not support debugging Mono, and will just throw a warning if you try to do it. The "Code" team is aware of this limitation, and we'll leave it at that.
### Automatic Update
With version 2.0 of the plugin, I've introduced a feature where it will auto-update itself if allowed. This should make things a lot easier in the future.
### Support
Please provide feedback through the GitHub [Issue](https://github.com/dotBunny/VSCode/issues) system.

8
Assets/VSCode/README.md.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5a47489a858c74f3ea182d15dec0dd72
timeCreated: 1444651605
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save