Version 3.3.0.1

AssemblyImportSettingsUtilities class

Namespace: Sirenix.Serialization.Utilities.Editor
Assembly: Sirenix.Serialization
public static class AssemblyImportSettingsUtilities
Utility for correctly setting import on OdinSerializer assemblies based on platform and scripting backend.
Inheritance
  • System.Object
  • AssemblyImportSettingsUtilities

Fields

JITApiCompatibilityLevels
All API compatibility levels that support JIT.
public static readonly ImmutableList<ApiCompatibilityLevel> JITApiCompatibilityLevels
JITPlatforms
All valid Unity BuildTarget platforms that support Just In Time compilation.
public static readonly ImmutableList<BuildTarget> JITPlatforms
JITScriptingBackends
All scripting backends that support JIT.
public static readonly ImmutableList<ScriptingImplementation> JITScriptingBackends
Platforms
All valid Unity BuildTarget platforms.
public static readonly ImmutableList<BuildTarget> Platforms

Methods

ApiCompatibilityLevelSupportsJIT(ApiCompatibilityLevel)
Gets a value that indicates if the specified api level supports JIT.
public static bool ApiCompatibilityLevelSupportsJIT(ApiCompatibilityLevel apiLevel)
Parameters
UnityEditor.ApiCompatibilityLevel apiLevel

The api level to test.

Returns
System.Boolean

true if the api level supports JIT; otherwise false.

GetCurrentApiCompatibilityLevel()
Gets the current API compatibility level from the Unity Editor. This method is Unity version independent.
public static ApiCompatibilityLevel GetCurrentApiCompatibilityLevel()
Returns
UnityEditor.ApiCompatibilityLevel

GetCurrentScriptingBackend()
Gets the current scripting backend for the build from the Unity editor. This method is Unity version independent.
public static ScriptingImplementation GetCurrentScriptingBackend()
Returns
UnityEditor.ScriptingImplementation

IsJITSupported(BuildTarget, ScriptingImplementation, ApiCompatibilityLevel)
Gets a value that indicates if the specified build settings supports JIT.
public static bool IsJITSupported(BuildTarget platform, ScriptingImplementation backend, ApiCompatibilityLevel apiLevel)
Parameters
UnityEditor.BuildTarget platform

The platform build setting.

UnityEditor.ScriptingImplementation backend

The scripting backend build settting.

UnityEditor.ApiCompatibilityLevel apiLevel

The api level build setting.

Returns
System.Boolean

true if the build settings supports JIT; otherwise false.

PlatformSupportsJIT(BuildTarget)
Gets a value that indicates if the specified platform supports JIT.
public static bool PlatformSupportsJIT(BuildTarget platform)
Parameters
UnityEditor.BuildTarget platform

The platform to test.

Returns
System.Boolean

true if the platform supports JIT; otherwise false.

ScriptingBackendSupportsJIT(ScriptingImplementation)
Gets a value that indicates if the specified scripting backend supports JIT.
public static bool ScriptingBackendSupportsJIT(ScriptingImplementation backend)
Parameters
UnityEditor.ScriptingImplementation backend

The backend to test.

Returns
System.Boolean

true if the backend supports JIT; otherwise false.

SetAssemblyImportSettings(BuildTarget, String, OdinAssemblyImportSettings)
Set the import settings on the assembly.
public static void SetAssemblyImportSettings(BuildTarget platform, string assemblyFilePath, OdinAssemblyImportSettings importSettings)
Parameters
UnityEditor.BuildTarget platform

System.String assemblyFilePath

The path to the assembly to configure import settings from.

OdinAssemblyImportSettings importSettings

The import settings to configure for the assembly at the path.

SetAssemblyImportSettings(BuildTarget, String, Boolean, Boolean)
Set the import settings on the assembly.
public static void SetAssemblyImportSettings(BuildTarget platform, string assemblyFilePath, bool includeInBuild, bool includeInEditor)
Parameters
UnityEditor.BuildTarget platform

System.String assemblyFilePath

The path to the assembly to configure import settings from.

System.Boolean includeInBuild

Indicates if the assembly should be included in the build.

System.Boolean includeInEditor

Indicates if the assembly should be included in the Unity editor.