Add namespace

This commit is contained in:
Santiago Lo Coco 2024-11-11 23:19:45 +01:00
parent 34e83ed312
commit d8f5282892
12 changed files with 1066 additions and 1030 deletions

View File

@ -2,6 +2,8 @@ using System.Collections.Generic;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class ConfigureNavBar : MonoBehaviour public class ConfigureNavBar : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -34,3 +36,4 @@ public class ConfigureNavBar : MonoBehaviour
} }
} }
} }
}

View File

@ -2,6 +2,8 @@ using Microsoft.MixedReality.Toolkit;
using Microsoft.MixedReality.Toolkit.SpatialAwareness; using Microsoft.MixedReality.Toolkit.SpatialAwareness;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class ConfigureObservers : MonoBehaviour public class ConfigureObservers : MonoBehaviour
{ {
private IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem; private IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem;
@ -22,3 +24,4 @@ public class ConfigureObservers : MonoBehaviour
} }
} }
} }
}

View File

@ -2,6 +2,8 @@ using System.Collections.Generic;
using Microsoft.MixedReality.Toolkit.Utilities.Solvers; using Microsoft.MixedReality.Toolkit.Utilities.Solvers;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class ConfigureOrbital : MonoBehaviour public class ConfigureOrbital : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -84,3 +86,4 @@ public class ConfigureOrbital : MonoBehaviour
} }
} }
} }
}

View File

@ -1,6 +1,8 @@
using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.Input;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class ConfigurePointer : MonoBehaviour public class ConfigurePointer : MonoBehaviour
{ {
private bool handRayPointerEnabled = true; private bool handRayPointerEnabled = true;
@ -32,3 +34,4 @@ public class ConfigurePointer : MonoBehaviour
PointerUtils.SetHandRayPointerBehavior(PointerBehavior.AlwaysOff); PointerUtils.SetHandRayPointerBehavior(PointerBehavior.AlwaysOff);
} }
} }
}

View File

@ -2,6 +2,8 @@ using System;
using Microsoft.MixedReality.Toolkit.UI; using Microsoft.MixedReality.Toolkit.UI;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class DialogHandler : MonoBehaviour public class DialogHandler : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -34,3 +36,4 @@ public class DialogHandler : MonoBehaviour
} }
} }
} }
}

View File

@ -5,6 +5,8 @@ using Microsoft.MixedReality.WebView;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
namespace WebViewStream
{
public class EndpointLoader : MonoBehaviour public class EndpointLoader : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -24,9 +26,9 @@ public class EndpointLoader : MonoBehaviour
private bool defaultEndpointLoaded = false; private bool defaultEndpointLoaded = false;
private List<GameObject> instantiatedItems = new List<GameObject>(); private List<GameObject> instantiatedItems = new List<GameObject>();
private HashSet<MdnsService> availableServices = new HashSet<MdnsService>(); private HashSet<MdnsService> availableServices = new HashSet<MdnsService>();
private float loadTimeout = 10f;
private bool areItemsVisible = true; private bool areItemsVisible = true;
private const float loadTimeout = 20f;
private const string defaultApiUrl = "http://windows.local:5000/api/endpoints"; private const string defaultApiUrl = "http://windows.local:5000/api/endpoints";
private const string defaultEndpoint1 = "http://windows.local:8100/mystream/"; private const string defaultEndpoint1 = "http://windows.local:8100/mystream/";
private const string defaultEndpoint2 = "http://windows.local:8200/mystream/"; private const string defaultEndpoint2 = "http://windows.local:8200/mystream/";
@ -343,3 +345,4 @@ public class EndpointLoader : MonoBehaviour
} }
} }
} }
}

View File

@ -1,3 +1,5 @@
namespace WebViewStream
{
public class MdnsService public class MdnsService
{ {
public string IpAddress { get; } public string IpAddress { get; }
@ -44,3 +46,4 @@ public class MdnsService
return hash; return hash;
} }
} }
}

View File

@ -1,6 +1,8 @@
using Microsoft.MixedReality.Toolkit.UI; using Microsoft.MixedReality.Toolkit.UI;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class ScrollablePagination : MonoBehaviour public class ScrollablePagination : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -21,3 +23,4 @@ public class ScrollablePagination : MonoBehaviour
scrollView.MoveByTiers(amount); scrollView.MoveByTiers(amount);
} }
} }
}

View File

@ -6,6 +6,8 @@ using System.Net.Sockets;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class ServiceDiscovery : MonoBehaviour public class ServiceDiscovery : MonoBehaviour
{ {
private UdpClient udpClient; private UdpClient udpClient;
@ -312,7 +314,7 @@ public class ServiceDiscovery : MonoBehaviour
{ {
originalOffset = offset + 2; originalOffset = offset + 2;
} }
offset = ((data[offset] & 0x3F) << 8) | data[offset + 1]; offset = (data[offset] & 0x3F) << 8 | data[offset + 1];
jumped = true; jumped = true;
} }
else else
@ -370,3 +372,4 @@ public class ServiceDiscovery : MonoBehaviour
udpClient = null; udpClient = null;
} }
} }
}

View File

@ -4,6 +4,8 @@ using Microsoft.MixedReality.Toolkit.Utilities;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class ServicesListPopulator : MonoBehaviour public class ServicesListPopulator : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -101,3 +103,4 @@ public class ServicesListPopulator : MonoBehaviour
gameObject.SetActive(isVisible); gameObject.SetActive(isVisible);
} }
} }
}

View File

@ -7,6 +7,8 @@ using UnityEngine.Windows.WebCam;
using Windows.Storage; using Windows.Storage;
#endif #endif
namespace WebViewStream
{
public class VideoCaptureHandler : MonoBehaviour public class VideoCaptureHandler : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -168,3 +170,4 @@ public class VideoCaptureHandler : MonoBehaviour
videoCapture = null; videoCapture = null;
} }
} }
}

View File

@ -3,6 +3,8 @@ using Microsoft.MixedReality.WebView;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
namespace WebViewStream
{
public class WebViewBrowser : MonoBehaviour public class WebViewBrowser : MonoBehaviour
{ {
[SerializeField] [SerializeField]
@ -43,3 +45,4 @@ public class WebViewBrowser : MonoBehaviour
} }
} }
} }
}