не понятно что за типы (SceneView и Macros) используются в примере для поиска сборки?
Assembly assembly = Assembly.GetAssembly(typeof(SceneView));
Assembly assembly = Assembly.GetAssembly(typeof(Macros));
Используется csharp
using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Collections.Generic;
using System.Reflection;
public static void ClearLog()
{
Assembly SampleAssembly;
// Создание экземпляра целевого объекта.
Int32 Integer1 = new Int32();
Type Type1;
// Установите экземпляр типа к типу целевого класса.
Type1 = Integer1.GetType();
// Создание экземпляра класса Ассамблеи узел корпуса целого типа.
SampleAssembly = Assembly.GetAssembly(Integer1.GetType());
if (SampleAssembly == null)
{
Debug.LogError("!!! (SampleAssembly == null)");
}
else
{
// Получает расположение сборки с использованием файла: протоколом.
Debug.Log("CodeBase=" + SampleAssembly.CodeBase);
//Type type = SampleAssembly.GetType("UnityEditor.LogEntries");
Type type = SampleAssembly.GetType("UnityEditorInternal.LogEntries");
if (type == null)
{
Debug.LogError("!!! (type == null)");
}
else
{
MethodInfo method = type.GetMethod("Clear");
if (method == null)
{
Debug.LogError("!!! (method == null)");
}
else
{
Debug.Log("method=" + method);
method.Invoke(new object(), null);
}
}
}
}
не получается найти тип!?
Type type = SampleAssembly.GetType