Search Unity

  1. Unity 2018.3 is now released.
    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. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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:
    6
    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();
    }
    }