文档

Unity Engine

Unity Engine

GetLoadedAssemblyPath(Assembly)

Returns location of the assembly.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static string GetLoadedAssemblyPath(this Assembly assembly)

Parameters

assembly

The assembly to look up the location of. Throws ArgumentNullException if null.

Returns

Type

Description

stringThe path to the assembly. Null if path is not known.

Examples

using UnityEditor;using UnityEngine;public static class AssemblyInfoExtractor{ [MenuItem("Test/Log Assembly Path")] static void LogAssemblyPath() { Debug.Log(typeof(AssemblyInfoExtractor).Assembly.GetLoadedAssemblyPath()); }}