#So I have a problem where I am suppose
1 messages ยท Page 1 of 1 (latest)
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 :
What is the error ?
And on play mode it looks like this on the second attempt:
It means you destroyed it.
And, you are using the prefab directly ?
Or are you instancianting it ?
It's in my game manager who stays active on every scenes.
It doesn't seem like it's destroyed
Then the issue does not seem to be that.
But it's the first line of the error message which is what troubles me
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 ?
Because I have this line that activates it or not here
childrenToEnableOrDisable.SetActive(true);
Which is the line that causes the problem
childrenToEnableOrDisable is destroyed
Because it proably is not the correct reference.
VoctoryPanel is not VictoryPanel
Ho yeah I saw the typing error and I fixed it after this screenshot ๐
Sorry about that, I tried to make screenshot in advance and forgot to update the second one
Yeah, I am sorry I cannot help you more with that from what I have.
This is pretty trivial error, but it is kinda hard to fix this way. Search around and you gonna find out. Use Logs and BreakPoints. The InstanceID can also help identify the object.
https://docs.unity3d.com/ScriptReference/Object.GetInstanceID.html
All good thanks for trying ๐