浏览代码

Fix reflexion for Handles.ApplyWireMaterial (there are two existing methode)

/main
Paul Demeulenaere 8 年前
当前提交
23844ccb
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      MaterialGraphProject/Assets/NewUI/Editor/Utils/UIHelpers.cs

4
MaterialGraphProject/Assets/NewUI/Editor/Utils/UIHelpers.cs


using System.Reflection;
using UnityEditor;
using System.Linq;
namespace RMGUI.GraphView
{

{
if (s_ApplyWireMaterialMi == null)
{
s_ApplyWireMaterialMi = typeof(HandleUtility).GetMethod("ApplyWireMaterial", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
var methods = typeof(HandleUtility).GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
s_ApplyWireMaterialMi = methods.First(o => o.Name == "ApplyWireMaterial" && o.GetGenericArguments().Count() == 0);
}
if (s_ApplyWireMaterialMi != null)

正在加载...
取消
保存