Y offset for press space messages

Announcements, support questions, and discussion for the Dialogue System.
Dragonception
Posts: 30
Joined: Sat Jan 19, 2019 2:14 pm

Re: Y offset for press space messages

Post by Dragonception »

This is in a new scene.

Image
Dragonception
Posts: 30
Joined: Sat Jan 19, 2019 2:14 pm

Re: Y offset for press space messages

Post by Dragonception »

Ah, for some reason the Main Selector Panel was not activated! Now I see it.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Y offset for press space messages

Post by Tony Li »

Normally it's only activated when the Selector/ProximitySelector has actually targeted something. After you customize its appearance, deactivate it. The Selector/ProximitySelector will reactivate it at runtime when needed.
Dragonception
Posts: 30
Joined: Sat Jan 19, 2019 2:14 pm

Re: Y offset for press space messages

Post by Dragonception »

Now the bad news. I have edited the Standard UI Selector Elements. It's now called AW Standard UI Selector Elements. It has been edited, definitely: when I drag it bag to a Canvas, I see the changes I made.

I drag this to both Element 0 and 1 of the Instantiate Prefabs.

No change when I run the game.
Dragonception
Posts: 30
Joined: Sat Jan 19, 2019 2:14 pm

Re: Y offset for press space messages

Post by Dragonception »

Is it possible it gets overwritten by the Selector settings themselves? But there the Alignment is not something that can be set to None. It must be set to something...
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Y offset for press space messages

Post by Tony Li »

Let's try to eliminate prefabs from the whole scenario. Please inspect the Instantiate Prefabs component, and remove any references to selector stuff. The Prefabs list may be left with a quest tracker prefab and a quest log window prefab if you're planning to use either of those.

Add AW Standard UI Selector Elements to the Dialogue Manager's Canvas. You don't need to do anything else. It just needs to exist in the scene. Double-check that the layout is still the way you want it. You can keep the Main Selector Panel child GameObject active. The Standard UI Selector Elements script will automatically deactivate it on start.

Finally, double-check that the GameObject that has your Selector or ProximitySelector (typically the player GameObject) also has a Selector Use Standard UI Elements component. This component tells the Selector/ProximitySelector to use the Standard UI Selector Elements.
Dragonception
Posts: 30
Joined: Sat Jan 19, 2019 2:14 pm

Re: Y offset for press space messages

Post by Dragonception »

That was it!

The player did not have a Selector Use Standard UI Elements component.

Thank you very much for your fantastic help! Time to 5-star your asset in the store!
Dragonception
Posts: 30
Joined: Sat Jan 19, 2019 2:14 pm

Re: Y offset for press space messages

Post by Dragonception »

Funny thing is, this only works when I drag the prefab to the Dialogue Canvas. Instantiating simply does not work and gives the standard UI, even with the Selector Use Standard UI Elements component implemented (it doesn't work without that component either).

Oh well, it works now. Maybe not the official way.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Y offset for press space messages

Post by Tony Li »

Thank you for the review!

I'm not quite sure what's going on with the instantiation. The Dialogue System's Demo instantiates the UI elements.

Regardless, it's probably better to just keep it in the scene anyway. That way you can easily edit it whenever you want.
Post Reply