#Arrow selector

1 messages · Page 1 of 1 (latest)

warped sphinx
#

Ok so, where can i find the debug log

wise tangle
#

Run your game, and hover over the elements. It will appear in that giant grey area under Console

warped sphinx
#

it dosent

#

thats why i am confused

wise tangle
#

This isnt related but helpful: Turn off Collapse, it isgoing to group similar messages and you wont know when you get a new one

#

then that means the function is not getting called at all

#

Check to see if the arrows or whatever this script is on is being blocked by anything, you can check in the EventSystem in your Hierarchy (on the left). It tells u what you hover on

warped sphinx
#

where do i see that

wise tangle
#

When you click on the EventSystem during gameplay something should pop up, let me pull up a screenshot

#

lol suddenly i got a null reference exception gimme a sec

wise tangle
#

it tells u UI information like pointerEnter is going to tell you what you want

knotty pumice
wise tangle
#

omg i didnt even see that.. it has a transform not recttransform

warped sphinx
wise tangle
#

ok that is definitely not what i told u to click on

warped sphinx
#

wait

#

ok

wise tangle
#

either way though, pumpkin found the actual bug

warped sphinx
#

got it

wise tangle
#

you must put this on a canvas, this currently isnt a UI element

#

because it has a transform, not a recttransform

warped sphinx
#

how do i do that?

wise tangle
#

I would definitely look at a tutorial for UI, but right click hierarchy, under UI, make a canvas

warped sphinx
#

k made one

knotty pumice
wise tangle
#

maybe for the background, put the image you have covering the entire background
new game, continue, and options can be text
then the arrows maybe make them images

#

im not entirely sure, maybe buttons even for the arrows

#

im not really good at UI either

knotty pumice
#

@warped sphinx just double checking, this is a ui element right, not a regular game object?

#

seems weird to me that it rendered without a canvas but dunno

warped sphinx
wise tangle
#

i imagine its just extremely scaled up

#

actually what is MainMenu, is that a canvas?

#

it really does look like some of these are UI elements

#

OH WAIT, this script is just on an empty transform

#

hold on a moment lol we gotta go through this hierarchy

warped sphinx
#

k want me to send a screenshot of ti>

wise tangle
#

Just send a screenshot after you click on MainMenu in your hierarchy

#

im almost confident thats a canvas

#

this one

warped sphinx
knotty pumice
wise tangle
#

what about starting menu..

#

surely thats a canvas

warped sphinx
#

it is

#

i just checked

wise tangle
#

ok we are saved

#

Sorry yea i just didnt realize this script was on an empty transform

#

This script needs to be on the object (with a rect transform) that you plan to hover over

#

right now, you have it on a gameobject which exists in 3d space. You cannot hover over this

#

you gotta put the script on the arrows basically

warped sphinx
#

so let me just confirm i attach the script i have to the three arrows

warped sphinx
knotty pumice
warped sphinx
knotty pumice
#

my phone’s about to die

wise tangle
#

you can just put the script itself on the arrow

#

which UI element is the arrows

warped sphinx
#

sorry i am lost, do you mind if i stream to you in dms?

wise tangle
#

sorry no i dont do 1 on 1s

warped sphinx
#

k

#

lets go back a few steps

wise tangle
#

Basically, the arrows have to be a UI element. The same way you put this script on Arrow System Continue, put it on the UI element

#

which thing in your hierarchy is specifically the arrow

#

like is it Arrow variation 2? are those rect transforms somehow

warped sphinx
#

arrow Continue and Options are Clones of Arrow ssytem new game

#

arrow system new game has 2 arrows in it one facing each way

wise tangle
#

but what element is the actual arrow that you want to disable

#

because this has nothing inside it

warped sphinx
#

Essentially what i want is for them all to start invisible and when you hover over the buttons like New game and continue and options the one for thqat button becomes visible

wise tangle
#

yes, but where are the actual arrows

#

like this thing, what UI element is rendering this for you

warped sphinx
#

i just dragged them in from my assets

#

arrow selector is a sprite in here

wise tangle
#

i understand it exists in your assets, but in your hierarchy one of these UI elements has to actually display the arrow

#

ah ok

#

so this selector needs to be under your canvas, have a rect transform, have that sprite renderer, AND the script you made

warped sphinx
#

or do i drag the Arrow system new game that holds it

wise tangle
#

you can drag the entire Arrow thing, but a lot of those really are empty

warped sphinx
#

and then i attach the script to them?

wise tangle
#

I would just make a new empty object under starting menu, call it arrows
then NewGameArrow which has 2 children, the left and right arrow
etc etc

#

instead of having arrow variation other side, and arrow variation which have 1 child each

#

yes, the script has to be on the arrow or some box ontop of the arrow

warped sphinx
#

so if i create an empty object called arrows

#

attack the script to it

#

then drag the three other arrows into it

#

then it should work>

#

?

wise tangle
#

the script has to be on each arrow

warped sphinx
#

on the sprite?

wise tangle
#

this 1 script should live on multiple objects, otherwise everything gets enabled and disabled at once

warped sphinx
#

right

wise tangle
#

honestly you should test this with 1 random arrow just in the middle of the screen

#

create a sprite under your starting menu, give it the arrow icon, put the script on, then see if it works

warped sphinx
#

i dont think it is

#

wait under scripts it says control object is that important

wise tangle
#

Im unsure what you mean by that

warped sphinx
#

would you mind having a look, i can send it to you on github

wise tangle
#

I don't have the time to do this

warped sphinx
#

ok i understand.

#

@wise tangle ok so i did what you said it dosent seem to work

#

console has nothing

wise tangle
#

Can you do the very first thing I said now with the event system and see what it tells u about pointer enter

wise tangle
#

After you do that test arrow

#

Because it will tell you the name of what you hover on

warped sphinx
#

ok lemme do that

warped sphinx
#

wait it says Hills unity game object

wise tangle
#

Can you show a screenshot

#

It will say things while you hover over things

warped sphinx
#

yep

wise tangle
#

In play mode at least, idk about in edit mode

warped sphinx
wise tangle
#

Hills is the object its seeing then, idk much about UI you may have to rearrange what's on top of each other

warped sphinx
#

k i will try that

#

its like it dosent even see it

#

hills is literally just this

warped sphinx
wise tangle
#

Yea im not entirely sure how the layering works

#

im sure you could figure it out through trial and error though, but definitely watch a tutorial for like onhover effects or pointer enter. Same thing just different names