1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2024-12-18 20:05:52 +01:00
MaiDXR/Assets/uWindowCapture/Editor/UwcIconTextureEditor.cs
2022-01-05 19:44:30 +01:00

24 lines
564 B
C#

using UnityEngine;
using UnityEditor;
namespace uWindowCapture
{
[CustomEditor(typeof(UwcIconTexture))]
public class UwcIconTextureEditor : Editor
{
UwcIconTexture texture
{
get { return target as UwcIconTexture; }
}
public override void OnInspectorGUI()
{
var windowTexture = (UwcWindowTexture)EditorGUILayout.ObjectField("Window Texture", texture.windowTexture, typeof(UwcWindowTexture), true);
if (texture.windowTexture != windowTexture) {
texture.windowTexture = windowTexture;
}
}
}
}