@@ -11,15 +11,17 @@ public class OllamaSupportWindow : EditorWindow
11
11
private Texture2D logo ;
12
12
13
13
private int selectedModelIndex ;
14
-
15
14
private bool isDownloading ;
16
15
16
+ private const string NeocortexUrl = "https://neocortex.link" ;
17
+ private const string NeocortexSignUpUrl = "https://neocortex.link/register" ;
18
+
17
19
[ MenuItem ( "Tools/Neocortex/Ollama Support" ) ]
18
20
public static void ShowWindow ( )
19
21
{
20
22
var window = GetWindow < OllamaSupportWindow > ( false , "Neocortex Ollama Support" , true ) ;
21
- window . minSize = new Vector2 ( 512 , 352 ) ;
22
- window . maxSize = new Vector2 ( 512 , 352 ) ;
23
+ window . minSize = new Vector2 ( 512 , 400 ) ; // Adjusted height for extra button
24
+ window . maxSize = new Vector2 ( 512 , 400 ) ;
23
25
}
24
26
25
27
private void OnEnable ( )
@@ -31,14 +33,19 @@ private void OnEnable()
31
33
ollama . SetPlatformDependedStrings ( ) ;
32
34
}
33
35
34
- private async void OnGUI ( )
36
+ private void OnGUI ( )
35
37
{
36
38
if ( logo )
37
39
{
38
40
float x = ( position . width - 512 ) / 2 ;
39
41
GUILayout . BeginHorizontal ( ) ;
40
42
GUILayout . Space ( x ) ;
41
- GUILayout . Label ( logo , GUILayout . Width ( 512 ) , GUILayout . Height ( 132 ) ) ;
43
+
44
+ if ( GUILayout . Button ( logo , GUIStyle . none , GUILayout . Width ( 512 ) , GUILayout . Height ( 132 ) ) )
45
+ {
46
+ Application . OpenURL ( NeocortexUrl ) ;
47
+ }
48
+
42
49
GUILayout . Space ( x ) ;
43
50
GUILayout . EndHorizontal ( ) ;
44
51
}
@@ -48,6 +55,13 @@ private async void OnGUI()
48
55
}
49
56
50
57
EditorGUILayout . BeginVertical ( "Box" ) ;
58
+
59
+ if ( GUILayout . Button ( "Sign Up for Neocortex" , GUILayout . Height ( 30 ) ) )
60
+ {
61
+ Application . OpenURL ( NeocortexSignUpUrl ) ;
62
+ }
63
+
64
+ GUILayout . Space ( 10 ) ;
51
65
52
66
EditorGUILayout . HelpBox (
53
67
"This window provides support for Ollama.\n Click the button below to download the necessary tools." ,
@@ -62,14 +76,13 @@ private async void OnGUI()
62
76
{
63
77
Application . OpenURL ( ollama . DownloadUrl ) ;
64
78
}
65
-
66
79
GUI . enabled = true ;
67
80
68
81
GUILayout . Space ( 10 ) ;
69
82
70
83
EditorGUILayout . HelpBox (
71
84
"At least 8 GB RAM is needed for 7B models, 16 GB for 13B models, and 32 GB for 33B models." +
72
- $ "\n Current Device: VRAM: { SystemInfo . graphicsMemorySize / 1024f : F1} GB, RAM: { SystemInfo . systemMemorySize / 1024f : F1} GB",
85
+ $ "\n Current Device: VRAM: { SystemInfo . graphicsMemorySize / 1024f : F1} GB, RAM: { SystemInfo . systemMemorySize / 1024f : F1} GB",
73
86
MessageType . Warning ) ;
74
87
75
88
GUI . enabled = ollama . IsOllamaInstalled ;
@@ -107,7 +120,6 @@ private async void OnGUI()
107
120
}
108
121
109
122
GUI . enabled = true ;
110
-
111
123
EditorGUILayout . EndVertical ( ) ;
112
124
}
113
125
@@ -128,4 +140,4 @@ private void UpdateProgressBar()
128
140
}
129
141
}
130
142
}
131
- }
143
+ }
0 commit comments