Hi every one, I’m working on a tool for unity and I want to make it using the “EditorWindow” class, everything it’s ok, now my problem is this:
class MyWindow extends EditorWindow {
var scrollTex : Vector2;
var guiSkin : GUISkin = Resources.LoadAssetAtPath(Assets/Editor/_Skin/MyGUISkin.guiskin);
--
-The ini() goes here-
--
function OnGUI () {
GUI.skin = guiSkin;
var mystyle : GUIStyle = GUI.skin.GetStyle("MyStyle");
scrollTex = EditorGUILayout.BeginScrollView(scrollTex, mystyle, GUILayout.Width(150));
EditorGUILayout.EndScrollView();
}
}
and end with this:
Assets/Editor/MyWindow.js(73,79): BCE0023: No appropriate version of ‘UnityEditor.EditorGUILayout.BeginScrollView’ for the argument list ‘(UnityEngine.Vector2, UnityEngine.GUIStyle, UnityEngine.GUILayoutOption)’ was found.
I read the manual and found this:
static function BeginScrollView (scrollPosition : Vector2, alwaysShowHorizontal : boolean, alwaysShowVertical : boolean, horizontalScrollbar : GUIStyle, verticalScrollbar : GUIStyle, background : GUIStyle, params options : GUILayoutOption) : Vector2
I want to apply my style in the “background”, how can this be possible?.
Thanks for your help in advance.