#my code is not working
1 messages · Page 1 of 1 (latest)
Do you have any compiler errors or warnings in the Unity console?
im trying to put it in here
yes
but that error has nothing to do with it
it has prob to do with this
Post error anyway, a single one will prevent the whole project from compiling.
and that is bcuz of this
Alright so it's compiling, as this error can only happen when the game runs
So you can't drag-drop?
Where are you dragging from?
yes i cant
im draging from my scripts
If it's from the project files (Assets window) that's incorrect
You have to attach Gamemanager to an object in the scene to be able to drag-drop it
but every script i use comes from there and i havent had any problems
ah k
lemme try that
wait and how do i do that
cuz i dont think i have done that alr
It's unlikely, since you have other scripts.
Select the object you want to attach it on in the Hierarchy, and in the Inspector scroll all the way down and click "Add Component"
Then use the search bar to select Gamemanager and confirm
Drag the object you attached the script on now
cuz all the scripts have a different logo with # on and this one doesn
so i dragg the object into itself
?
cuz this is inside of the object
If you added it to the same object as EndTrigger, then you can do that yeah
From the Hierarchy, drag-drop the object into EndTrigger's exposed field
And for the icon that is different, it's because GameManager is a special name Unity recognizes and puts a special icon for it.
it works
ah k
ty very much
SPR2 sry for bothering you again but i have another question
Yeah go ahead
its abbout draging something in again
i need to drag my level complete screen into there but its not working
You added that onto an object in the scene, so drop it onto the GameManager that is on the object in the scene
In 98% of the cases you won't be able to drag-drop anything from/to scripts in your Assets
As long as you learn, you're not wasting my time