Text too big

So i got everything setup, things are looking great so i decided to add a lives system into the game as I thought it was missing, i pieced it together bit by bit until i was left with only the text to implement. Now the problem is even with text size 1 its still huge in comparison to the play space size.

Any help?

Hi,

What’s the Render Mode set to on the Canvas?

By the way, you can paste images straight into your posts on the forum.

Thanks for the quick reply, And thanks for the tip on pasting images in i didnt know haha

Give Screen Space Camera a whirl, and drag your main camera in to the field Render Camera, Plane Distance 100

Can I get a screenshot of your Hierarchy, with each item expanded too please.

For reference, here are some settings you can try;

Canvas inside the PlaySpace;

Canvas settings (click it, it’s big);

This could well be important, based on my setup;

Scene;

I can change the camera render mode to the same as yours and in the scene view the text disappears, but when played, it’s fine. Obviously not being able to see all of your settings makes it a bit hard to diagnose, hence the screenshots above :slight_smile:

Hey guys, did you try it programmatically? I want to set the camera to the canvas by code to use it as a prefab element, but I can’t find the solution.

btw @Rob thanks for your post it helped me a lot to add text to my game

1 Like

You’re more than welcome Luis.

Regarding the camera…

Consider create a public variable in your script which will give you the ability to drag your prefab’d camera into within the Inspector.

Regarding the code to create an instance of it… take a look at the Instantiate method, you will use this in Laser Defender incidentally.

Instantiate is an overloaded method, meaning that it has multiple signatures, the one I think would work for you is the fourth one down from the top of the documentation listed below.

Hope this helps :slight_smile:


See also;

1 Like

Hey @Rob thanks for the answer and sorry for the late response,

The public variable is the approach that I´m using right now and it works well, however, is annoying to drag the camera every time I create a new level.

I´ll take a look at the Instantiate method to see if it solve my problem. Anyway, I guess I should go deeper in the course to learn more things like that.

Thanks again :slight_smile:

Hi,

You’re welcome.

You shouldn’t need to drag the camera into the exposed variable in each scene.

Whatever GameObject has that script attached is clearly in each scene, so drag it in once and then prefab that GameObject. Then use that in each scene instead.

Remember to drag in the camera prefab, not a camera instance from a scene when your make your prefab.

1 Like

Oh, maybe I did the opposite and I used a camera instance, I’ll take a look then

1 Like

Let us know how you get on :slight_smile:

It worked like a charm! Haha I spent a lot of time trying that and it was so simple, you are the best @Rob!

1 Like

Glad you have it all working Luis :slight_smile:

Privacy & Terms