This very simple credits scroller should get you started.
using UnityEngine;
public class Credits : MonoBehaviour
{
private float offset;
public float speed = 29.0f;
public GUIStyle style;
private void Start()
{
this.offset = Screen.height;
}
private void Update()
{
this.offset -= Time.deltaTime * this.speed;
}
private void OnGUI()
{
var position = new Rect( 0, this.offset, Screen.width, Screen.height );
var text = @"Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Quisque a mauris sit amet neque posuere molestie at laoreet lorem.
Suspendisse accumsan pretium ante, sit amet tincidunt tortor tempor ac.
Sed condimentum mi id nisi egestas non vulputate urna porttitor.
Mauris sed mauris vitae velit imperdiet vulputate ut nec velit.
Maecenas convallis posuere velit, quis interdum justo mattis vel.
Aliquam hendrerit ullamcorper dui, a laoreet dolor ornare sit amet.
Praesent sed odio purus, a convallis tellus.
Nulla porttitor arcu vel ipsum luctus euismod.
Duis tincidunt vehicula nisl, nec venenatis velit convallis non.
Sed semper metus egestas libero venenatis imperdiet.
Pellentesque venenatis orci nisi, vel fringilla dolor.
Nam at lacus massa, commodo pellentesque velit.
In accumsan velit sed nisi aliquam tristique.
Ut eu quam tellus, eu egestas diam.
Maecenas vel dui vitae orci accumsan molestie.
Donec pulvinar metus nec turpis rutrum quis gravida ante dignissim.
Ut quis justo quis nisl eleifend ornare non at ipsum.";
GUI.Label( position, text, this.style );
}
}
Use the style to make the default font larger (about 24px?), change the color so the text is visible on your background and set the alignment to Top/Center.
Good luck with it.
answered
Sep 20 '12 at 04:42 PM
robin.theilade
16
Yeah True. I will not be spending loads of time on these small features but once I have Finished the levels Menu etc.. I might just add them in.
Thanks anyways
i dunno i think companies are starting to add more into the menu, maybe not in mobile games but i have found more games putting the instruction booklet in the game instead of in the box, and the way games are going we will see more of this.
i can see how if there is a lot of people working on a game it can be annoying, but for a small team it only takes 20 minutes.
put your entire credits into one gui element and move the gui up past the camera viewport that renders gui, nothing fancy but its only credits
yeah I just think It would help out the people that helped me make the music etc..
Thanks anyway :D
Omit the credits because most people don't care about them nowadays? When have people ever really cared about the credits? On movies, on TV shows, on a CD... you don't do it for the customers, you do it to recognize the people who helped work on the game.
That said, there are ways to make credits more interesting. The Incredibles had a great end-credits sequence, and Scribblenauts had a good one too.
Yeah they do :D