#Coding problem

1 messages · Page 1 of 1 (latest)

calm condor
#

@spring wedge So i made a script right here. (no errors that are visible)

spring wedge
#

ok

calm condor
#

My sciprt box should look like this

spring wedge
#

ok

calm condor
#

but it looks like this

#

i do not know if i made any errors or what

vagrant moon
#

Do you have any errors and does the script ne match the class name

modest matrix
spring wedge
#

is there a reason hy all this are red but not the top one?

#

i have never seen that

tame creek
#

Class name doesn't match file name

calm condor
spring wedge
modest matrix
#

Make sure your code is saved

spring wedge
modest matrix
#

and/or restart Unity and Visual Studio

calm condor
#

No but when i open that script in my component or library it shows the default without that coding

#

so i have to switch tabs

#

and it may be applied wrong

tame creek
#

Facepalm
PhysicsHands class in file PhysicsHand.cs

spring wedge
#

ha yh

tame creek
#

They must be identical for Unity to pick the script up

calm condor
#

Yes i think that is the problem

#

look

spring wedge
#

the name of the script and class is diffrent

#

take out the s at the end of phsyicshands in the script line 3

calm condor
#

i open the script that is added in my component and it shows this. the other tab is my real one.

#

how shall i fix it

spring wedge
vagrant moon
#

You have been showing unrelated code the entire time

calm condor
vagrant moon
#

You just put a blank script on this object

calm condor
#

yes but it wont switch

spring wedge
tame creek
calm condor
#

it keeps going back to default

spring wedge
#

what you prob did is copy the code, the whole thing and then changed just the class name

calm condor
#

oh alr

#

lemme test

#

No it just adds either physicsHANDS or Default

#

But it did fix it so

#

Thank you! Guys