Sets the type of content that the shared library contains.
This is only applicable for plugins that use the .so
file extension.
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); } }