#So I have a problem where I am suppose

1 messages ยท Page 1 of 1 (latest)

untold karma
#

I have VictoryCanvasEnablerer that has a script that is suppose to enable VictoryPanel.

#

I put childrenToEnableOrDisable here and it seems like everything works for the first time.

It looks like this :

hybrid lily
#

What is the error ?

untold karma
#

And on play mode it looks like this on the second attempt:

untold karma
hybrid lily
#

It means you destroyed it.

#

And, you are using the prefab directly ?

#

Or are you instancianting it ?

untold karma
#

It's in my game manager who stays active on every scenes.

#

It doesn't seem like it's destroyed

hybrid lily
#

Then the issue does not seem to be that.

untold karma
#

But it's the first line of the error message which is what troubles me

hybrid lily
#

No, the error is correct.

#

I mean, it is not because you are destroying this particualr object.

#

But you are definitly not using the correct one.

#

Why it is VoctoryPanel in reference ?

untold karma
#

Because I have this line that activates it or not here

        childrenToEnableOrDisable.SetActive(true);
#

Which is the line that causes the problem

hybrid lily
#

childrenToEnableOrDisable is destroyed

#

Because it proably is not the correct reference.

#

VoctoryPanel is not VictoryPanel

untold karma
#

Ho yeah I saw the typing error and I fixed it after this screenshot ๐Ÿ˜…

hybrid lily
untold karma
#

Sorry about that, I tried to make screenshot in advance and forgot to update the second one

hybrid lily
untold karma