열차 목업의 내부 확인용 프로젝트
smchoi
2024-07-23 891576775c982322c685f6bedae3460ed1116011
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// ALIyerEdon@gmail.com - Writed at July 2021
// All rights reserved
 
using UnityEditor;
using UnityEngine;
 
public class Rate_Me : EditorWindow
{
    [MenuItem("Window/Rate Asset")]
    public static void ShowWindow()
    {
        GetWindow<Rate_Me>(false, "Rate Asset", true);
    }
    public static void DrawUILine(Color color, int thickness = 2, int padding = 10)
    {
        Rect r = EditorGUILayout.GetControlRect(GUILayout.Height(padding + thickness));
        r.height = thickness;
        r.y += padding / 2;
        r.x -= 2;
        r.width += 6;
        EditorGUI.DrawRect(r, color);
    }
 
    private const int windowWidth = 610;
    private const int windowHeight = 300;
    Vector2 _scrollPosition;
    public bool dontShow;
 
    void OnEnable()
    {
        titleContent = new GUIContent("Rate the asset");
        maxSize = new Vector2(windowWidth, windowHeight);
        minSize = maxSize;
                        
    }
 
    private void OnGUI()
    {
        
        Texture2D border = EditorGUIUtility.Load("Assets/TreePackVol.1/Editor/Textures/UI/Ads/Rate_Border.psd") as Texture2D;
        Texture2D ad1 = EditorGUIUtility.Load("Assets/TreePackVol.1/Editor/Textures/UI/Ads/Rate_Asset.psd") as Texture2D;
       
        EditorGUILayout.Space();
        EditorGUILayout.HelpBox("Rate this asset", MessageType.None);
        EditorGUILayout.Space();
      
 
 
        _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition,
                     false,
                     false,
                     GUILayout.Width(windowWidth),
                     GUILayout.Height(windowHeight-20));        //---------Ad 1-------------------------------------------------
                                                                //  GUILayout.BeginVertical("Box");
 
        //_scrollPosition = EditorGUILayout.BeginScrollView(scrollViewRect, _scrollPosition, new Rect(0, 0, 2000, 2000));
       
        if (GUILayout.Button(border, "", GUILayout.Width(600), GUILayout.Height(130)))
        {
            Application.OpenURL("https://assetstore.unity.com/packages/slug/279185");
        }
 
        if (GUILayout.Button(ad1, "", GUILayout.Width(600), GUILayout.Height(130)))
        {
            Application.OpenURL("https://assetstore.unity.com/packages/slug/279185");
        }
 
        EditorGUILayout.EndScrollView();
 
    }
}