public void Initialize(EditorWindow parentWindow, TidyBlockMapCreator mapCreator){ this.parentWindow = parentWindow; this.mapCreator = mapCreator; itemSelectedTexture = GetIcon(TidyFileNames.ICON_ITEM_SELECTED); PopulateBlockList(); this.parentWindow.name = TidyMessages.BLOCK_EDITOR_WINDOW_NAME; }
void OnEnable() { //UpdateWindow.Init(); if(mapPainter == null){ mapPainter = new TidyBlockMapCreator(); mapPainter.Initialize(this); SceneView.onSceneGUIDelegate += mapPainter.DrawScene; } }
public ReflectedPlugin(string typeName, string methodName, Assembly assembly,TidyBlockMapCreator mapCreator){ this.assembly = assembly; this.type = assembly.GetType(typeName); if(this.type == null){ Debug.LogWarning("Could not find type: " + typeName + " in assembly: " + assembly.FullName); return; } obj = Activator.CreateInstance(type) as ITTMPlugin; if(obj == null){ Debug.LogWarning("Could not create ITTMPlugin from type: " + typeName + " in assembly: " + assembly.FullName); return; } obj.InitializePlugin(mapCreator.parentWindow,mapCreator); }