Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Newbie needs help with IMGUI -> need to disable scrollbar in scrollview

Discussion in 'Extensions & OnGUI' started by cgklutts, Sep 14, 2018.

  1. cgklutts

    cgklutts

    Joined:
    Jun 3, 2014
    Posts:
    3
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class Story : MonoBehaviour {
    public Vector2 scrollView;
    public GUIStyle textStyle;

    private void OnGUI()
    {
    scrollView = GUILayout.BeginScrollView(scrollView, false, false, GUILayout.Width(Screen.width), GUILayout.Height(Screen.height));
    GUILayout.TextArea("This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk99");
    GUILayout.Button("Click me");
    GUILayout.Button("button");
    GUI.EndScrollView();
    }
    }