AndroidPluginImporterUtilities.GetAndroidSharedLibraryType

Declaration

public static Android.AndroidSharedLibraryType GetAndroidSharedLibraryType(PluginImporter importer);

Returns

AndroidSharedLibraryType Returns the AndroidSharedLibraryType that represents the type of content that the shared library contains.

Description

Gets the type of content that the shared library contains.

using UnityEngine;
using UnityEditor;
using UnityEditor.Android;

public class SharedLibraryTypes : EditorWindow { const string SharedLibraryPath = "Insert_Path_To_SharedLibrary.so";

[MenuItem("Examples/SharedLibraryTypes")] static void Init() { SharedLibraryTypes window = (SharedLibraryTypes)EditorWindow.GetWindow(typeof(SharedLibraryTypes), true, "SharedLibraryTypes"); window.Show(); }

void SetFileToBe(AndroidSharedLibraryType type) { PluginImporter imp = (PluginImporter)PluginImporter.GetAtPath(SharedLibraryPath); imp.SetAndroidSharedLibraryType(type); }

void OnGUI() { if (GUILayout.Button("Set file to be symbol")) SetFileToBe(AndroidSharedLibraryType.Symbol);

if (GUILayout.Button("Set file to be executable")) SetFileToBe(AndroidSharedLibraryType.Executable); } }

Did you find this page useful? Please give it a rating: