SetAndroidSharedLibraryType(PluginImporter, AndroidSharedLibraryType)
Sets the type of content that the shared library contains.
Read time 1 minuteLast updated 21 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Android
- Assembly: UnityEditor.Android.Extensions
public static void SetAndroidSharedLibraryType(this PluginImporter importer, AndroidSharedLibraryType type)
Parameters
Remarks
This is only applicable for plugins that use the file extension.
.soExamples
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); }}