Fixed Line endings on shaders (?)

Removed unnecessary usings (who knew there were so many, I'm normally so tidy :P)
release
Simon Jackson 2017-05-05 14:25:48 +01:00
parent dc809858b9
commit 35b88a2487
55 changed files with 86 additions and 97 deletions

View File

@ -5,7 +5,7 @@ using UnityEngine.UI.Extensions;
namespace UnityEditor.UI
{
[CustomEditor(typeof(AccordionElement), true)]
[CustomEditor(typeof(AccordionElement), true)]
public class AccordionElementEditor : ToggleEditor {
public override void OnInspectorGUI()

View File

@ -1,9 +1,7 @@
///Credit Jason Horsburgh
///Sourced from - https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/issues/127/uilinerenderer-mesh-not-updating-in-editor
using UnityEditor;
using UnityEngine;
using UnityEngine.UI.Extensions;
using UnityEditor;
namespace UnityEngine.UI.Extensions
{

View File

@ -5,11 +5,11 @@ using UnityEngine.UI.Extensions;
namespace UnityEditor.UI
{
/// <summary>
/// This script adds the Extensions UI menu options to the Unity Editor.
/// </summary>
/// <summary>
/// This script adds the Extensions UI menu options to the Unity Editor.
/// </summary>
static internal class ExtensionMenuOptions
static internal class ExtensionMenuOptions
{
#region Unity Builder section - Do not change unless UI Source (Editor\MenuOptions) changes
#region Unity Builder properties - Do not change unless UI Source (Editor\MenuOptions) changes

View File

@ -7,7 +7,6 @@
using UnityEngine;
using UnityEngine.UI;
using System;
using UnityEngine.UI.Extensions;

View File

@ -4,7 +4,7 @@
namespace UnityEngine.UI.Extensions
{
[RequireComponent(typeof(VerticalLayoutGroup), typeof(ContentSizeFitter), typeof(ToggleGroup))]
[RequireComponent(typeof(VerticalLayoutGroup), typeof(ContentSizeFitter), typeof(ToggleGroup))]
[AddComponentMenu("UI/Extensions/Accordion/Accordion Group")]
public class Accordion : MonoBehaviour
{

View File

@ -6,7 +6,7 @@ using UnityEngine.UI.Extensions.Tweens;
namespace UnityEngine.UI.Extensions
{
[RequireComponent(typeof(RectTransform), typeof(LayoutElement))]
[RequireComponent(typeof(RectTransform), typeof(LayoutElement))]
[AddComponentMenu("UI/Extensions/Accordion/Accordion Element")]
public class AccordionElement : Toggle
{

View File

@ -1,12 +1,11 @@
///Credit ChoMPHi
///Sourced from - http://forum.unity3d.com/threads/accordion-type-layout.271818/
using System.Collections;
using UnityEngine.Events;
namespace UnityEngine.UI.Extensions.Tweens
{
public struct FloatTween : ITweenValue
public struct FloatTween : ITweenValue
{
public class FloatTweenCallback : UnityEvent<float> {}
public class FloatFinishCallback : UnityEvent {}

View File

@ -1,11 +1,10 @@
///Credit ChoMPHi
///Sourced from - http://forum.unity3d.com/threads/accordion-type-layout.271818/
using System.Collections;
namespace UnityEngine.UI.Extensions.Tweens
{
internal interface ITweenValue
internal interface ITweenValue
{
void TweenValue(float floatPercentage);
bool ignoreTimeScale { get; }

View File

@ -5,10 +5,10 @@ using System.Collections;
namespace UnityEngine.UI.Extensions.Tweens
{
// Tween runner, executes the given tween.
// The coroutine will live within the given
// behaviour container.
internal class TweenRunner<T> where T : struct, ITweenValue
// Tween runner, executes the given tween.
// The coroutine will live within the given
// behaviour container.
internal class TweenRunner<T> where T : struct, ITweenValue
{
protected MonoBehaviour m_CoroutineContainer;
protected IEnumerator m_Tween;

View File

@ -1,11 +1,10 @@
///Credit judah4
///Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
using System.Globalization;
namespace UnityEngine.UI.Extensions.ColorPicker
{
[RequireComponent(typeof(Image))]
[RequireComponent(typeof(Image))]
public class ColorImage : MonoBehaviour
{
public ColorPickerControl picker;

View File

@ -1,12 +1,11 @@
///Credit judah4
///Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
using System.Globalization;
namespace UnityEngine.UI.Extensions.ColorPicker
{
[RequireComponent(typeof(Text))]
[RequireComponent(typeof(Text))]
public class ColorLabel : MonoBehaviour
{
public ColorPickerControl picker;

View File

@ -1,7 +1,6 @@
///Credit judah4
///Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
using System.Globalization;
namespace UnityEngine.UI.Extensions.ColorPicker
{

View File

@ -1,5 +1,5 @@
using UnityEngine;
using System;
using System;
using UnityEngine;
using UnityEngine.Events;
[Serializable]

View File

@ -1,5 +1,4 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Events;
public class HSVChangedEvent : UnityEvent<float, float, float>
{

View File

@ -6,7 +6,7 @@ using System.Globalization;
namespace UnityEngine.UI.Extensions.ColorPicker
{
[RequireComponent(typeof(InputField))]
[RequireComponent(typeof(InputField))]
public class HexColorField : MonoBehaviour
{
public ColorPickerControl ColorPicker;

View File

@ -1,7 +1,6 @@
///Credit judah4
///Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
using System.Globalization;
namespace UnityEngine.UI.Extensions.ColorPicker
{

View File

@ -1,11 +1,10 @@
///Credit judah4
///Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
using System.Globalization;
namespace UnityEngine.UI.Extensions
{
public class TiltWindow : MonoBehaviour
public class TiltWindow : MonoBehaviour
{
public Vector2 range = new Vector2(5f, 3f);

View File

@ -22,7 +22,7 @@ namespace UnityEngine.UI.Extensions
private InputField _mainInput;
private RectTransform _inputRT;
private Button _arrow_Button;
//private Button _arrow_Button;
private RectTransform _rectTransform;
@ -136,7 +136,7 @@ namespace UnityEngine.UI.Extensions
_inputRT = _rectTransform.FindChild("InputField").GetComponent<RectTransform>();
_mainInput = _inputRT.GetComponent<InputField>();
_arrow_Button = _rectTransform.FindChild ("ArrowBtn").GetComponent<Button> ();
//_arrow_Button = _rectTransform.FindChild ("ArrowBtn").GetComponent<Button> ();
_overlayRT = _rectTransform.FindChild("Overlay").GetComponent<RectTransform>();
_overlayRT.gameObject.SetActive(false);

View File

@ -6,10 +6,10 @@ using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
/// <summary>
/// Extension to the UI class which creates a dropdown list
/// </summary>
[RequireComponent(typeof(RectTransform))]
/// <summary>
/// Extension to the UI class which creates a dropdown list
/// </summary>
[RequireComponent(typeof(RectTransform))]
[AddComponentMenu("UI/Extensions/Dropdown List")]
public class DropDownList : MonoBehaviour
{

View File

@ -2,8 +2,6 @@
/// Sourced from - http://forum.unity3d.com/threads/free-reorderable-list.364600/
using System;
using System.Collections;
using System.Linq;
using UnityEngine.Events;
namespace UnityEngine.UI.Extensions

View File

@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions

View File

@ -5,7 +5,7 @@ using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/RescalePanels/RescaleDragPanel")]
[AddComponentMenu("UI/Extensions/RescalePanels/RescaleDragPanel")]
public class RescaleDragPanel : MonoBehaviour, IPointerDownHandler, IDragHandler
{
private Vector2 pointerOffset;

View File

@ -5,7 +5,7 @@ using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/RescalePanels/RescalePanel")]
[AddComponentMenu("UI/Extensions/RescalePanels/RescalePanel")]
public class RescalePanel : MonoBehaviour, IPointerDownHandler, IDragHandler
{
public Vector2 minSize;

View File

@ -5,7 +5,7 @@ using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/RescalePanels/ResizePanel")]
[AddComponentMenu("UI/Extensions/RescalePanels/ResizePanel")]
public class ResizePanel : MonoBehaviour, IPointerDownHandler, IDragHandler
{
public Vector2 minSize;

View File

@ -7,10 +7,10 @@
namespace UnityEngine.UI.Extensions
{
/*
/*
* Implement this interface on any MonoBehaviour that you'd like to be considered selectable.
*/
public interface IBoxSelectable {
public interface IBoxSelectable {
bool selected {
get;
set;

View File

@ -31,7 +31,7 @@ using UnityEngine.Events;
namespace UnityEngine.UI.Extensions
{
[RequireComponent(typeof(Canvas))]
[RequireComponent(typeof(Canvas))]
[AddComponentMenu("UI/Extensions/Selection Box")]
public class SelectionBox : MonoBehaviour
{

View File

@ -11,7 +11,7 @@ using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Effects/Extensions/Gradient2")]
[AddComponentMenu("UI/Effects/Extensions/Gradient2")]
public class Gradient2 : BaseMeshEffect {
[SerializeField]
Type _gradientType;

View File

@ -45,7 +45,7 @@ using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Effects/Extensions/Letter Spacing")]
[AddComponentMenu("UI/Effects/Extensions/Letter Spacing")]
///Summary
/// Note, Vertex Count has changed in 5.2.1+, is now 6 (two tris) instead of 4 (tri strip).
public class LetterSpacing : BaseMeshEffect

View File

@ -45,7 +45,7 @@ using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Effects/Extensions/Mono Spacing")]
[AddComponentMenu("UI/Effects/Extensions/Mono Spacing")]
[RequireComponent(typeof(Text))]
[RequireComponent(typeof(RectTransform))]
///Summary

View File

@ -4,8 +4,8 @@
using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
//An outline that looks a bit nicer than the default one. It has less "holes" in the outline by drawing more copies of the effect
[AddComponentMenu("UI/Effects/Extensions/Nicer Outline")]
//An outline that looks a bit nicer than the default one. It has less "holes" in the outline by drawing more copies of the effect
[AddComponentMenu("UI/Effects/Extensions/Nicer Outline")]
public class NicerOutline : BaseMeshEffect
{
[SerializeField]

View File

@ -1,8 +1,5 @@
using System;
/// Credit ChoMPHi
/// Sourced from - http://forum.unity3d.com/threads/script-flippable-for-ui-graphics.291711/
using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{

View File

@ -7,7 +7,8 @@
///
/// </summary>
namespace UnityEngine.UI.Extensions {
namespace UnityEngine.UI.Extensions
{
/// <summary>
/// TODO:
/// - add automatic child sizing, like in the HorizontalOrVerticalLayoutGroup.cs

View File

@ -8,10 +8,10 @@ using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
/// <summary>
/// Layout Group controller that arranges children in rows, fitting as many on a line until total width exceeds parent bounds
/// </summary>
[AddComponentMenu("Layout/Extensions/Flow Layout Group")]
/// <summary>
/// Layout Group controller that arranges children in rows, fitting as many on a line until total width exceeds parent bounds
/// </summary>
[AddComponentMenu("Layout/Extensions/Flow Layout Group")]
public class FlowLayoutGroup : LayoutGroup
{
public float SpacingX = 0f;

View File

@ -4,7 +4,7 @@ using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions
{
public class ScrollSnapBase : MonoBehaviour, IBeginDragHandler, IDragHandler
public class ScrollSnapBase : MonoBehaviour, IBeginDragHandler, IDragHandler
{
internal RectTransform _screensContainer;
internal bool _isVertical;

View File

@ -1,7 +1,6 @@
/// Credit Ges
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-3#post-2280109
using System.Collections;
using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions

View File

@ -16,7 +16,8 @@
///
/// </summary>
namespace UnityEngine.UI.Extensions {
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/Primitives/Cut Corners")]
public class UICornerCut : UIPrimitiveBase
{

View File

@ -1,11 +1,10 @@
/// Credit John Hattan (http://thecodezone.com/)
/// Sourced from - https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/issues/117/uigridrenderer
using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/Primitives/UIGridRenderer")]
[AddComponentMenu("UI/Extensions/Primitives/UIGridRenderer")]
public class UIGridRenderer : UILineRenderer
{
[SerializeField]

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/Primitives/UILineRenderer")]
[AddComponentMenu("UI/Extensions/Primitives/UILineRenderer")]
public class UILineRenderer : UIPrimitiveBase
{
private enum SegmentType

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/Primitives/UILineTextureRenderer")]
[AddComponentMenu("UI/Extensions/Primitives/UILineTextureRenderer")]
public class UILineTextureRenderer : UIPrimitiveBase
{
[SerializeField]

View File

@ -4,7 +4,7 @@ using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/Bound Tooltip/Tooltip Trigger")]
[AddComponentMenu("UI/Extensions/Bound Tooltip/Tooltip Trigger")]
public class BoundTooltipTrigger : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler
{
[TextAreaAttribute]

View File

@ -1,8 +1,8 @@
using System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine.EventSystems;
using System.Linq;
using UnityEngine.Events;
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{

View File

@ -11,7 +11,7 @@ using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/ScrollRectEx")]
[AddComponentMenu("UI/Extensions/ScrollRectEx")]
public class ScrollRectEx : ScrollRect
{
private bool routeToParent = false;

View File

@ -1,5 +1,3 @@
using System.Runtime.Serialization;
namespace UnityEngine.UI.Extensions
{
/// <summary>

View File

@ -1,5 +1,3 @@
using System.Runtime.Serialization;
namespace UnityEngine.UI.Extensions
{
/// <summary>

View File

@ -1,5 +1,3 @@
using System.Runtime.Serialization;
namespace UnityEngine.UI.Extensions
{
/// <summary>

View File

@ -1,5 +1,4 @@
using UnityEngine;
using System.Collections;
public class TestCompression : MonoBehaviour {

View File

@ -1,4 +1,5 @@
/// Credit zero3growlithe
using System.Collections.Generic;
/// Credit zero3growlithe
/// sourced from: http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-2011648
/*USAGE:
@ -6,7 +7,6 @@ Simply place the script on the ScrollRect that contains the selectable children
and drag'n'drop the RectTransform of the options "container" that we'll be scrolling.*/
using UnityEngine.EventSystems;
using System.Collections.Generic;
namespace UnityEngine.UI.Extensions
{

View File

@ -1,7 +1,6 @@
/// Credit Ralph Barbagallo (www.flarb.com /www.ralphbarbagallo.com / @flarb)
/// Sourced from - http://forum.unity3d.com/threads/vr-cursor-possible-unity-4-6-gui-bug-or-is-it-me
using System.Collections;
namespace UnityEngine.UI.Extensions
{
[AddComponentMenu("UI/Extensions/VR Cursor")]

View File

@ -1,4 +1,6 @@
Shader "UI Extensions/SoftMaskShader"
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "UI Extensions/SoftMaskShader"
{
Properties
{
@ -92,7 +94,7 @@
v2f OUT;
float4 wolrdPos = IN.vertex;
OUT.maskTexcoord = TRANSFORM_TEX(wolrdPos.xy, _AlphaMask);
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET

View File

@ -1,4 +1,6 @@
Shader "UI Extensions/UIAdditive"
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "UI Extensions/UIAdditive"
{
Properties
{
@ -68,7 +70,7 @@
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);

View File

@ -1,4 +1,6 @@
/// Credit 00christian00
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
/// Credit 00christian00
/// Sourced from - http://forum.unity3d.com/threads/any-way-to-show-part-of-an-image-without-using-mask.360085/#post-2332030
Shader "UI Extensions/UI Image Crop" {
@ -46,7 +48,7 @@ Shader "UI Extensions/UI Image Crop" {
v2f o;
o.color=v.color;
o.color.a=0.1;
o.pos = mul (UNITY_MATRIX_MVP, v.pos);
o.pos = UnityObjectToClipPos (v.pos);
o.uv=TRANSFORM_TEX(v.uv, _MainTex);

View File

@ -1,4 +1,6 @@
Shader "UI Extensions/UILinearDodge"
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "UI Extensions/UILinearDodge"
{
Properties
{
@ -69,7 +71,7 @@
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);

View File

@ -1,4 +1,6 @@
Shader "UI Extensions/UIMultiply"
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "UI Extensions/UIMultiply"
{
Properties
{
@ -68,7 +70,7 @@
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);

View File

@ -1,4 +1,6 @@
Shader "UI Extensions/UIScreen"
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "UI Extensions/UIScreen"
{
Properties
{
@ -69,7 +71,7 @@
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);

View File

@ -1,4 +1,6 @@
Shader "UI Extensions/UISoftAdditive"
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "UI Extensions/UISoftAdditive"
{
Properties
{
@ -68,7 +70,7 @@
v2f vert(appdata_t IN)
{
v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);