Skip to content

Commit

Permalink
style: applied code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Whinarn committed Mar 26, 2021
1 parent 8f37f81 commit 0d19af4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Runtime/LODGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@ namespace UnityMeshSimplifier
/// </summary>
public static class LODGenerator
{
#region Consts
#region Static Read-Only
/// <summary>
/// The name of the game object where generated LODs are parented under.
/// </summary>
public const string LODParentGameObjectName = "_UMS_LODs_";
public static readonly string LODParentGameObjectName = "_UMS_LODs_";

/// <summary>
/// The default parent path for generated LOD assets.
/// </summary>
public const string LODAssetDefaultParentPath = AssetsRootPath + "UMS_LODs/";
public static readonly string LODAssetDefaultParentPath = AssetsRootPath + "UMS_LODs/";

/// <summary>
/// The root assets path.
/// </summary>
public const string AssetsRootPath = "Assets/";
public static readonly string AssetsRootPath = "Assets/";

/// <summary>
/// The user data applied to created LOD assets.
/// </summary>
public const string LODAssetUserData = "UnityMeshSimplifierLODAsset";
public static readonly string LODAssetUserData = "UnityMeshSimplifierLODAsset";
#endregion

#region Nested Types
Expand Down
5 changes: 2 additions & 3 deletions Runtime/Utility/IOUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ internal static string MakeSafeRelativePath(string path)
if (string.IsNullOrEmpty(path))
return null;

path = path.Replace('\\', '/');
path = path.Trim('/');
path = path.Replace('\\', '/').Trim('/');

if (Path.IsPathRooted(path))
throw new ArgumentException("The path cannot be rooted.", "path");

// Make the path safe
var pathParts = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
var pathParts = path.Split(new [] { '/' }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < pathParts.Length; i++)
{
pathParts[i] = MakeSafeFileName(pathParts[i]);
Expand Down

0 comments on commit 0d19af4

Please sign in to comment.