Files
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
}
}