Move third party assets to ThirdParty folder

This commit is contained in:
2024-08-08 11:26:28 +02:00
parent 386f303057
commit bd91af6f98
10340 changed files with 100 additions and 175 deletions

View File

@@ -0,0 +1,36 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HttpUwrException.cs" company="VRMADA">
// Copyright (c) VRMADA, All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace UltimateXR.Exceptions
{
/// <summary>
/// Unity Web Request HTTP exception.
/// </summary>
public sealed class HttpUwrException : UwrException
{
#region Public Types & Data
/// <summary>
/// Gets the HTTP response code.
/// </summary>
public long ResponseCode { get; }
#endregion
#region Constructors & Finalizer
/// <summary>
/// Constructor.
/// </summary>
/// <param name="error">Error message</param>
/// <param name="responseCode">HTTP response code</param>
public HttpUwrException(string error, long responseCode) : base(error)
{
ResponseCode = responseCode;
}
#endregion
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5985414bb7b447f891957b5dbec91c2b
timeCreated: 1625058003

View File

@@ -0,0 +1,25 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NetUwrException.cs" company="VRMADA">
// Copyright (c) VRMADA, All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace UltimateXR.Exceptions
{
/// <summary>
/// Unity Web Request Net exception.
/// </summary>
public sealed class NetUwrException : UwrException
{
#region Constructors & Finalizer
/// <summary>
/// Constructor.
/// </summary>
/// <param name="message">Error message</param>
public NetUwrException(string message) : base(message)
{
}
#endregion
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c50a02d1a6bc4a899ab98a4c34ea7d8a
timeCreated: 1625058003

View File

@@ -0,0 +1,27 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UwrException.cs" company="VRMADA">
// Copyright (c) VRMADA, All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
using System;
namespace UltimateXR.Exceptions
{
/// <summary>
/// Base class for Unity Web Request exceptions.
/// </summary>
public abstract class UwrException : Exception
{
#region Constructors & Finalizer
/// <summary>
/// Constructor.
/// </summary>
/// <param name="message">Exception message</param>
protected UwrException(string message) : base(message)
{
}
#endregion
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a08e6a3b385b470fa6c87f4168615936
timeCreated: 1625058171

View File

@@ -0,0 +1,57 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UxrComponentNotFoundException.cs" company="VRMADA">
// Copyright (c) VRMADA, All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
using System;
using UltimateXR.Core.Unique;
namespace UltimateXR.Exceptions
{
/// <summary>
/// UltimateXR Component not found exception. This exception is normally thrown when a method that uses
/// <see cref="UxrUniqueIdImplementer.TryGetComponentById" /> could not find the component.
/// <see cref="UxrUniqueIdImplementer.TryGetComponentById" /> itself doesn't throw any exception.
/// </summary>
public sealed class UxrComponentNotFoundException : Exception
{
#region Public Types & Data
/// <summary>
/// Gets the component's unique ID that could not be found.
/// </summary>
public Guid UniqueId { get; }
#endregion
#region Constructors & Finalizer
/// <summary>
/// Constructor.
/// </summary>
/// <param name="uniqueId">The unique ID of the component that was going to be retrieved</param>
/// <param name="message">Exception message</param>
public UxrComponentNotFoundException(Guid uniqueId, string message = null) : base(FormatMessage(uniqueId, message))
{
UniqueId = uniqueId;
}
#endregion
#region Private Methods
/// <summary>
/// Gets a formatted exception message.
/// </summary>
/// <param name="uniqueId">The unique ID of the component that was going to be retrieved</param>
/// <param name="message">Original message</param>
/// <returns>Exception message</returns>
private static string FormatMessage(Guid uniqueId, string message)
{
string prefix = string.IsNullOrEmpty(message) ? $"{message}: " : string.Empty;
return $"{prefix}Could not find the given component using {nameof(UxrUniqueIdImplementer)}.{nameof(UxrUniqueIdImplementer.TryGetComponentById)}(). Id is {(uniqueId != null ? uniqueId == default ? "empty" : uniqueId : "null")}.";
}
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: efb11988d9e787e408aec4685dc6cd69
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UxrSerializableClassNotFoundException.cs" company="VRMADA">
// Copyright (c) VRMADA, All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
using System;
using UltimateXR.Core.Serialization;
using UltimateXR.Core.StateSync;
namespace UltimateXR.Exceptions
{
/// <summary>
/// Exception thrown when trying to deserialize an object that implements the <see cref="IUxrSerializable" /> interface
/// but can't be instantiated using the name/assembly provided.
/// </summary>
public sealed class UxrSerializableClassNotFoundException : Exception
{
#region Public Types & Data
/// <summary>
/// Gets the class type name.
/// </summary>
public string ClassName { get; }
/// <summary>
/// Gets the assembly where the type is located.
/// </summary>
public string AssemblyName { get; }
#endregion
#region Constructors & Finalizer
/// <summary>
/// Constructor.
/// </summary>
/// <param name="className">Class name</param>
/// <param name="assemblyName">Assembly name where the type is located</param>
/// <param name="message">Exception message</param>
public UxrSerializableClassNotFoundException(string className, string assemblyName, string message = null) : base(FormatMessage(className, assemblyName, message))
{
ClassName = className;
AssemblyName = assemblyName;
}
#endregion
#region Private Methods
/// <summary>
/// Gets a formatted exception message.
/// </summary>
/// <param name="className">Class name</param>
/// <param name="assemblyName">Assembly name where the type is located</param>
/// <param name="message">Original message</param>
/// <returns>Exception message</returns>
private static string FormatMessage(string className, string assemblyName, string message)
{
string assemblyInformation = !string.IsNullOrEmpty(assemblyName) ? $" in assembly {assemblyName}" : string.Empty;
string prefix = !string.IsNullOrEmpty(message) ? $"{message}: " : string.Empty;
return $"{prefix}Can't instantiate type {className}{assemblyInformation} or it does not implement the {nameof(IUxrSerializable)} interface.";
}
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a46b99d826801274aacb1b7ccfeaba41
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: