#it s a spelling error because it s

1 messages · Page 1 of 1 (latest)

west elbow
#

now it's saying Assets\CoinSpawner.cs(18,24): error CS0019: Operator '*' cannot be applied to operands of type 'Vector2' and 'double'

#

shouldn't i be able to multiply them

hallow inlet
#

if you make the second number a float you can

west elbow
#

it's just a number not a variable do i have to specify it's a float??

#

the line is var spawnPos = Random.insideUnitCircle.normalized * 4.5; btw

hallow inlet
#

yes and 4.5 is a double not a float. make it a float

west elbow
#

how...

hallow inlet
#

remember f is for float

west elbow
#

ohh yeah i remember that from my like 1h java experience

#

so 4.5f?

#

instead of 4.5?

hallow inlet
#

try it and find out

west elbow
#

ok 🤷‍♂️

#

it finally worked lol

#

i really need to watch some c# tutorials

hallow inlet
west elbow
#

by the way can i use the plain image to drag and drop into the inspector somehow or should i just put it into a gameobject and drag that

hallow inlet
#

if you want to render an image in game you would use either a SpriteRenderer if it is supposed to be in the world or an Image component if it is supposed to be UI

west elbow
#

oh wait yeah i'm dumb it is just a gameobject