0
Answered

Floating message prefab not showing

Oliver Marshall 3 months ago in Game Creator updated by Marti (Lead Developer) 3 months ago 2



Hi

I have customised the floating message prefab, just changed the sprite to something else and changed the font. 

I've set the default prefab in the GC prefs, but when the message shows in the game it doesn't show the prefab, just the default slanted one.

This is what is shown in the game.

But this is what the prefab looks like


This is the inspector.

It does look like it's picked up the new font. But perhaps it's being slanted somewhere that I can't see. 

Any ideas?

Olly

Unity version:
Game Creator version:

Disabling the Canvas Scaler script on the prefab seems to fix it. 

However now the floating message appears behind tiles on a lower order than the invoking object. 

Olly

Answered

The Floating Message is set in world space, so it will always appear behind higher order sprites. Despite this, the Canvas Scaler simply deals with screen resolution. It shouldn't affect the rendering order. Neither the slanging. I'm not sure what may be the cause of this, to be honest.

Also looks like you get some kind of anti-aliasing, which I believe it's not something wanted for pixel-art games.

If you want to create a custom floating message skin, I'd recommend first going over the UI components and how they are rendered at the Unity Learn section.