#Coding problem
1 messages · Page 1 of 1 (latest)
ok
My sciprt box should look like this
ok
Do you have any errors and does the script ne match the class name
Check your console window, probably you have errors
Class name doesn't match file name
this is the only thing i have in there
do you have another script called the same name?
Make sure your code is saved
and this
and/or restart Unity and Visual Studio
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
Facepalm
PhysicsHands class in file PhysicsHand.cs
ha yh
They must be identical for Unity to pick the script up
the name of the script and class is diffrent
take out the s at the end of phsyicshands in the script line 3
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
everything beneath here is your solution
So thats the script you added to the component
You have been showing unrelated code the entire time
if i do that this pops up
You just put a blank script on this object
yes but it wont switch
becasue it already exists
Save and delete the empty one
it keeps going back to default
what you prob did is copy the code, the whole thing and then changed just the class name