Fixed Line endings on shaders (?)

Removed unnecessary usings (who knew there were so many, I'm normally so tidy :P)
pull/413/head
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 namespace UnityEditor.UI
{ {
[CustomEditor(typeof(AccordionElement), true)] [CustomEditor(typeof(AccordionElement), true)]
public class AccordionElementEditor : ToggleEditor { public class AccordionElementEditor : ToggleEditor {
public override void OnInspectorGUI() public override void OnInspectorGUI()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,13 +4,13 @@
///Sourced from - http://forum.unity3d.com/threads/color-picker.267043/ ///Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
namespace UnityEngine.UI.Extensions namespace UnityEngine.UI.Extensions
{ {
/* /*
* Implement this interface on any MonoBehaviour that you'd like to be considered selectable. * Implement this interface on any MonoBehaviour that you'd like to be considered selectable.
*/ */
public interface IBoxSelectable { public interface IBoxSelectable {
bool selected { bool selected {
get; get;
set; set;

View File

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

View File

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

View File

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

View File

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

View File

@ -4,8 +4,8 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace UnityEngine.UI.Extensions 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 //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")] [AddComponentMenu("UI/Effects/Extensions/Nicer Outline")]
public class NicerOutline : BaseMeshEffect public class NicerOutline : BaseMeshEffect
{ {
[SerializeField] [SerializeField]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions 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 public class BoundTooltipTrigger : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler
{ {
[TextAreaAttribute] [TextAreaAttribute]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
using UnityEngine; using UnityEngine;
using System.Collections;
public class TestCompression : MonoBehaviour { 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 /// sourced from: http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-2011648
/*USAGE: /*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.*/ and drag'n'drop the RectTransform of the options "container" that we'll be scrolling.*/
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using System.Collections.Generic;
namespace UnityEngine.UI.Extensions namespace UnityEngine.UI.Extensions
{ {

View File

@ -1,7 +1,6 @@
/// Credit Ralph Barbagallo (www.flarb.com /www.ralphbarbagallo.com / @flarb) /// 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 /// 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 namespace UnityEngine.UI.Extensions
{ {
[AddComponentMenu("UI/Extensions/VR Cursor")] [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 Properties
{ {
@ -92,7 +94,7 @@
v2f OUT; v2f OUT;
float4 wolrdPos = IN.vertex; float4 wolrdPos = IN.vertex;
OUT.maskTexcoord = TRANSFORM_TEX(wolrdPos.xy, _AlphaMask); OUT.maskTexcoord = TRANSFORM_TEX(wolrdPos.xy, _AlphaMask);
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord; OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET #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 Properties
{ {
@ -68,7 +70,7 @@
v2f vert(appdata_t IN) v2f vert(appdata_t IN)
{ {
v2f OUT; v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord; OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET #ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); 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 /// 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" { Shader "UI Extensions/UI Image Crop" {
@ -46,7 +48,7 @@ Shader "UI Extensions/UI Image Crop" {
v2f o; v2f o;
o.color=v.color; o.color=v.color;
o.color.a=0.1; 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); 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 Properties
{ {
@ -69,7 +71,7 @@
v2f vert(appdata_t IN) v2f vert(appdata_t IN)
{ {
v2f OUT; v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord; OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET #ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); 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 Properties
{ {
@ -68,7 +70,7 @@
v2f vert(appdata_t IN) v2f vert(appdata_t IN)
{ {
v2f OUT; v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord; OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET #ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); 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 Properties
{ {
@ -69,7 +71,7 @@
v2f vert(appdata_t IN) v2f vert(appdata_t IN)
{ {
v2f OUT; v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord; OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET #ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); 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 Properties
{ {
@ -68,7 +70,7 @@
v2f vert(appdata_t IN) v2f vert(appdata_t IN)
{ {
v2f OUT; v2f OUT;
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord; OUT.texcoord = IN.texcoord;
#ifdef UNITY_HALF_TEXEL_OFFSET #ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);