根据NETAnalyzers调整代码
This commit is contained in:
何冠峰
2024-07-08 18:54:07 +08:00
parent e664f20d34
commit 21fbb01ce4
8 changed files with 16 additions and 18 deletions

View File

@@ -67,7 +67,7 @@ namespace YooAsset
/// <summary>
/// 子资源对象集合
/// </summary>
public UnityEngine.Object[] AllAssetObjects
public IReadOnlyList<UnityEngine.Object> AllAssetObjects
{
get
{

View File

@@ -67,7 +67,7 @@ namespace YooAsset
/// <summary>
/// 子资源对象集合
/// </summary>
public UnityEngine.Object[] AllAssetObjects
public IReadOnlyList<UnityEngine.Object> AllAssetObjects
{
get
{

View File

@@ -344,7 +344,7 @@ namespace YooAsset
if (string.IsNullOrEmpty(location) == false)
{
// 检查路径末尾是否有空格
int index = location.LastIndexOf(" ");
int index = location.LastIndexOf(' ');
if (index != -1)
{
if (location.Length == index + 1)

View File

@@ -1,9 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace YooAsset
{
@@ -29,7 +27,7 @@ namespace YooAsset
if (string.IsNullOrEmpty(str))
return str;
int index = str.LastIndexOf(".");
int index = str.LastIndexOf('.');
if (index == -1)
return str;
else