public ReflectionType GetTypeObject(System.Type t) { ReflectionType type = null; if (typeCache.TryGetValue(t.FullName, out type)) { return(type); } type = new ReflectionType(t); typeCache.Add(t.FullName, type); return(type); }
public FrameInfoCrawler(ReflectionCache rcache) { this.reflectionCache = rcache; this.frameDebuggeUtil = reflectionCache.GetTypeObject("UnityEditorInternal.FrameDebuggerUtility"); this.frameEventData = reflectionCache.GetTypeObject("UnityEditorInternal.FrameDebuggerEventData"); var frameDebuggerWindowType = this.reflectionCache.GetTypeObject("UnityEditor.FrameDebuggerWindow"); var window = frameDebuggerWindowType.CallMethod <object>("ShowFrameDebuggerWindow", null, null); this.frameDebuggerWindowObj = new ReflectionClassWithObject(frameDebuggerWindowType, window); this.IsRunning = false; this.alreadyWriteTextureDict = new Dictionary <int, TextureUtility.SaveTextureInfo>(); this.savedRenderTexture = new Dictionary <SavedRenderTextureInfo, TextureUtility.SaveTextureInfo>(); this.renderTextureLastChanged = new Dictionary <int, int>(); }
public ReflectionType GetTypeObject(string fullname) { ReflectionType type = null; if (typeCache.TryGetValue(fullname, out type)) { return(type); } var asms = System.AppDomain.CurrentDomain.GetAssemblies(); foreach (var asm in asms) { var t = asm.GetType(fullname); if (t != null) { type = new ReflectionType(t); typeCache.Add(fullname, type); return(type); } } return(null); }
public ReflectionClassWithObject(ReflectionType t, object obj) { this.type = t; this.target = obj; }