Files
Hasebe/Library/PackageCache/com.unity.addressables@42676f2a154e/Tests/Editor/DocExampleCode/ScriptReference/UsingAssetRefSpriteValidateAsset.cs
T
2026-09-21 12:15:57 +03:00

19 lines
513 B
C#

namespace AddressableAssets.DocExampleCode
{
using UnityEditor;
using UnityEngine.AddressableAssets;
internal class UsingAssetRefSpriteValidateAsset
{
#region SAMPLE
public bool IsPathValid()
{
string guid = AssetDatabase.AssetPathToGUID("Assets/Sprites/oldSprite.png");
AssetReferenceSprite assetRef = new AssetReferenceSprite(guid);
return assetRef.ValidateAsset("Assets/Sprites/newSprite.png");
}
#endregion
}
}