Unity Editor拡張で単純に画像を表示させたかったのですが、調べてもあまり出てこなかったのでメモです。ボタンに表示、Inspectorに表示は出てきますがなぜか出てこない。
下のサンプルではAssets/test.pngを読み込みそれをGUI.DrawTextureしています。
| 1 2 | Texture2D texture = AssetDatabase.LoadMainAssetAtPath("Assets/test.png") as Texture2D; GUI.DrawTexture(new Rect(0, 0, 32, 32), texture, ScaleMode.StretchToFill); | 
 
		         
							
														
						 
							
														
						




 
					
				![[AIR] zipの解凍 (Windows)](https://i0.wp.com/mizutanikirin.net/blog/wp-content/uploads/2015/09/air1-150x150.jpg?resize=150%2C150&ssl=1)




コメントを残す