#Help GameObject error

1 messages · Page 1 of 1 (latest)

worn ibex
#

Hello can i get help i got this error in brackeys begginer game development the error

'GameObject' does not contain a definition for 'SetActive' and no accessible extension method 'SetActive' accepting a first argument of type 'GameObject' could be found (are you missing a using directive or an assembly reference?)

here is the game he's making https://www.youtube.com/watch?v=Iv7A8TzreY4&list=PLPV2KyIb3jR53Jce9hP7G5xC4O9AgnOuL&index=10&t=481s

Let's make a way to reach new levels!

● Download the Project Files: http://devassets.com/assets/how-to-make-a-video-game/

♥ Support my videos on Patreon: http://patreon.com/brackeys/

····················································································

This video is part of a mini-series on making your first game in Unity.

··...

▶ Play video
true minnow
#

code?

You're trying to access a function called SetActive from the GameObject Class.
Are you trying to access the animator?

worn ibex
#

Sorry wait a minute

worn ibex
#

bro my file is loading for a long time

frigid bluffBOT
worn ibex
true minnow
#

did you give the script the gameobject through the inspector?

worn ibex
true minnow
#

yes but are you passing the gameobject through the inspector?

worn ibex
#

What do you mean?

#

Oh i cant put a UI cause this error is blocking the Var

true minnow
#

it seems you might have to reimport or redo yours script. Unity can't read it

daring junco
#

No

#

Don't delete your script

#

There is a problem with naming your script GameManager

#

Whenever you name a script GameManager, unity somehow turns it into this cog symbol and it becomes weird

#

If you change the script name to something like MainGameManager then this issue should be fixed

worn ibex