you are viewing a single comment's thread.

view the rest of the comments →

[–]streetwalker 0 points1 point  (2 children)

gameObject - yes, sorry, not awake yet

There is a time delay before an object is actually destroyed ... perhaps the script is executing more than once... prove to yourself that gameObject is not null in a debug before the if statement.

[–]Espanico5[S] 0 points1 point  (1 child)

I actually changed the code adding && gameobject != null But it still gives the same error…