以下の内容はhttps://baba-s.hatenablog.com/entry/2019/03/25/110300より取得しました。


【Unity】マネージドプラグインやネイティブプラグインの設定をスクリプトから変更できる「PluginImporter」

概要

using UnityEditor;

public static class Example
{
    [MenuItem( "Tools/Hoge" )]
    private static void Hoge()
    {
        var obj = Selection.activeObject;
        var path = AssetDatabase.GetAssetPath( obj );
        var importer = AssetImporter.GetAtPath( path ) as PluginImporter;

        // Select platforms for plugin の Any Platform を変更する
        importer.SetCompatibleWithAnyPlatform( false );

        // Select platforms for plugin の Include Platforms を変更する
        importer.SetCompatibleWithEditor( true );
        importer.SetCompatibleWithPlatform( BuildTarget.iOS, true );

        // Select platforms for plugin の Exclude Platforms を変更する
        importer.SetExcludeFromAnyPlatform( BuildTarget.iOS, true );
    }
}

f:id:baba_s:20190324143245p:plain

「PluginImporter」を使用すると、
マネージドプラグインやネイティブプラグインの設定をスクリプトから変更できます

参考サイト様




以上の内容はhttps://baba-s.hatenablog.com/entry/2019/03/25/110300より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14