コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】ディープリンクで Unity のアセットを開く例

概要

using Needle.Deeplink;
using UnityEditor;
using UnityEngine;

internal static class Example
{
    [DeepLink( RegexFilter = @"com.unity3d.kharma:open-asset\/(.*)" )]
    private static bool OpenAsset( string assetName )
    {
        Debug.Log( assetName );
        var asset = AssetDatabase.LoadAssetAtPath<Object>( assetName );
        return AssetDatabase.OpenAsset( asset );
    }
}
[Example.cs を開く](https://fwd.needle.tools/deeplink?com.unity3d.kharma:open-asset/Assets/Editor/Example.cs)

関連記事