Skip to content

Commit

Permalink
Removed UI button
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbourgeois committed Sep 20, 2018
1 parent dab0892 commit 9666fe4
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 231 deletions.
250 changes: 23 additions & 227 deletions Assets/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -185,129 +185,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &304144612
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 304144613}
- component: {fileID: 304144616}
- component: {fileID: 304144615}
- component: {fileID: 304144614}
m_Layer: 0
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &304144613
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 304144612}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2128594029}
m_Father: {fileID: 1865854799}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -75, y: -75}
m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &304144614
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 304144612}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 304144615}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1444567570}
m_MethodName: ToggleUI
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &304144615
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 304144612}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &304144616
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 304144612}
m_CullTransparentMesh: 0
--- !u!1 &634186155
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -385,6 +262,7 @@ GameObject:
- component: {fileID: 1025062258}
- component: {fileID: 1025062260}
- component: {fileID: 1025062262}
- component: {fileID: 1025062261}
m_Layer: 0
m_Name: Art-Net receiver
m_TagString: Untagged
Expand All @@ -405,9 +283,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
DeviceIP:
StartChannel: 1
ColorRed: 0
ColorGreen: 0
ColorBlue: 0
Red: 0
Green: 0
Blue: 0
Running: 0
--- !u!4 &1025062259
Transform:
Expand Down Expand Up @@ -447,9 +325,21 @@ MonoBehaviour:
DeviceIP:
ListeningPort: 0
StartChannel: 1
ColorRed: 0
ColorGreen: 0
ColorBlue: 0
Red: 0
Green: 0
Blue: 0
--- !u!114 &1025062261
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1025062257}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bcfe1df72e72e484d911c0e8ea75c84a, type: 3}
m_Name:
m_EditorClassIdentifier:
Canvas: {fileID: 2124440111}
--- !u!114 &1025062262
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -463,12 +353,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
QuadMaterial: {fileID: 2100000, guid: 6d7c162d228214e4d864b0426aa6f3ff, type: 2}
Receiver: {fileID: 1025062258}
--- !u!114 &1444567570 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114736921750431862, guid: 79c2718dd59243e4c90e145349e7dadf,
type: 2}
m_PrefabInternal: {fileID: 1865854798}
m_Script: {fileID: 11500000, guid: 82735d6d849c37f428ed8699076fb09a, type: 3}
--- !u!1 &1766892196
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -613,7 +497,7 @@ Prefab:
- target: {fileID: 224261597021104126, guid: 79c2718dd59243e4c90e145349e7dadf,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0.000061035156
value: 0
objectReference: {fileID: 0}
- target: {fileID: 223663083649269814, guid: 79c2718dd59243e4c90e145349e7dadf,
type: 2}
Expand Down Expand Up @@ -692,96 +576,8 @@ Prefab:
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 79c2718dd59243e4c90e145349e7dadf, type: 2}
m_IsPrefabAsset: 0
--- !u!224 &1865854799 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 224016024828273574, guid: 79c2718dd59243e4c90e145349e7dadf,
--- !u!1 &2124440111 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1239703226258500, guid: 79c2718dd59243e4c90e145349e7dadf,
type: 2}
m_PrefabInternal: {fileID: 1865854798}
--- !u!1 &2128594028
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2128594029}
- component: {fileID: 2128594031}
- component: {fileID: 2128594030}
- component: {fileID: 2128594032}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2128594029
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2128594028}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 304144613}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2128594030
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2128594028}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 75
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 7
m_MaxSize: 129
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: UI
--- !u!222 &2128594031
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2128594028}
m_CullTransparentMesh: 0
--- !u!114 &2128594032
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2128594028}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 244612195ab41fe41b38a10438c92a73, type: 3}
m_Name:
m_EditorClassIdentifier:
MyMaterial: {fileID: 2100000, guid: 6d7c162d228214e4d864b0426aa6f3ff, type: 2}
2 changes: 1 addition & 1 deletion Assets/Materials/QuadMat.mat
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 0.12941177, b: 0.12941177, a: 1}
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
4 changes: 2 additions & 2 deletions Assets/Scripts/ArtNetReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ArtNetReceiver : MonoBehaviour {

public string DeviceIP;

private int _listeningPort = 5999;
private int _listeningPort = 6454;
public int ListeningPort
{
get
Expand Down Expand Up @@ -66,7 +66,7 @@ private void OnApplicationQuit()
private void ThreadMethod()
{
Running = true;
udp = new UdpClient(5999);
udp = new UdpClient(6454);
//udp.Client.ReceiveTimeout = 1000; //1sec

while (true)
Expand Down
19 changes: 19 additions & 0 deletions Assets/Scripts/InputManager.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class InputManager : MonoBehaviour {

public GameObject Canvas;

private bool isPressed;

private void Update()
{
if (Input.touchCount > 0)
{
if (!isPressed && !EventSystem.current.IsPointerOverGameObject())
{
ToggleUI();
}
isPressed = true;
}
else
{
isPressed = false;
}
}

public void ToggleUI()
{
Canvas.SetActive(!Canvas.activeInHierarchy);
Expand Down
1 change: 0 additions & 1 deletion ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ GraphicsSettings:
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down

0 comments on commit 9666fe4

Please sign in to comment.