コード例 #1
0
ファイル: qb_Painter.cs プロジェクト: ianburnette/IslandFox
	void OnEnable()
	{
		window = this;
		onSceneGUIFunc = this.OnSceneGUI;
		SceneView.onSceneGUIDelegate += onSceneGUIFunc;
		
		string guiPath = "Assets/ProCore/QuickBrush/Resources/Skin/";
		
		addPrefabTexture			= AssetDatabase.LoadAssetAtPath(guiPath + "qb_addPrefabIcon.tga", typeof(Texture2D)) as Texture2D;
		addPrefabFieldTexture		= AssetDatabase.LoadAssetAtPath(guiPath + "qb_addPrefabField.tga", typeof(Texture2D)) as Texture2D;
		removePrefabXTexture_normal	= AssetDatabase.LoadAssetAtPath(guiPath + "qb_removePrefabXIcon_normal.tga", typeof(Texture2D)) as Texture2D;
		removePrefabXTexture_hover 	= AssetDatabase.LoadAssetAtPath(guiPath + "qb_removePrefabXIcon_hover.tga", typeof(Texture2D)) as Texture2D;
		
		selectPrefabCheckTexture_normal = AssetDatabase.LoadAssetAtPath(guiPath + "qb_selectPrefabCheck_normal.tga", typeof(Texture2D)) as Texture2D;
		selectPrefabCheckTexture_hover 	= AssetDatabase.LoadAssetAtPath(guiPath + "qb_selectPrefabCheck_hover.tga", typeof(Texture2D)) as Texture2D;
		prefabFieldBackgroundTexture 	= AssetDatabase.LoadAssetAtPath(guiPath + "qb_prefabFieldBackground.tga", typeof(Texture2D)) as Texture2D;
		
		brushIcon_Active 		= AssetDatabase.LoadAssetAtPath(guiPath + "qb_brushIcon_Active.tga", typeof(Texture2D)) as Texture2D;
		brushIcon_Inactive 		= AssetDatabase.LoadAssetAtPath(guiPath + "qb_brushIcon_Inactive.tga", typeof(Texture2D)) as Texture2D;
				
		eraserIcon_Active		= AssetDatabase.LoadAssetAtPath(guiPath + "qb_eraserIcon_Active.tga", typeof(Texture2D)) as Texture2D;
		eraserIcon_Inactive		= AssetDatabase.LoadAssetAtPath(guiPath + "qb_eraserIcon_Inactive.tga", typeof(Texture2D)) as Texture2D;		
		
		placementIcon_Active	= AssetDatabase.LoadAssetAtPath(guiPath + "qb_placementIcon_Active.tga", typeof(Texture2D)) as Texture2D;		
		/////
		
		UpdateGroups();
		//BuildStyles();
		EnableMenu();
		ClearForm();
		
		//Temp Removes any instance of ObjectContainer from the scene.
		//qb_ObjectContainer tryInstance = (qb_ObjectContainer)FindObjectOfType(typeof(qb_ObjectContainer));
		//if(tryInstance != null)
		//	Object.DestroyImmediate(tryInstance.gameObject);
	}
コード例 #2
0
ファイル: qb_Painter.cs プロジェクト: davia966/Just-a-Student
	//static string prefs_directory = string.Empty; //The Directory in which templates are stored - should be validated - if invalid, create when template is saved
#endregion
	
	public void OnEnable()
	{
		window = this;
		onSceneGUIFunc = this.OnSceneGUI;
		SceneView.onSceneGUIDelegate += onSceneGUIFunc;
		
		directory = qb_Utility.GetHeadDirectory();		
		
		LoadTextures();
		BuildStyles();
		
		EnableMenu();
	}