In case you missed it: Portal must be at the root level

In an effort to keep everything tidy, I put the Portal game object inside one of my folders in the project, so nothing worked as expected until i remembered, “…this will only work at the root level.” Was not sure what that was referring to at first, but now I do.

1 Like

Yes, it’s one of those bugs that can be hard to track down because Unity chose to flag the message telling you that it won’t work as a Warning, not as an error. Since Unity also pesters us about 1/2 of our [SerializeField] entries in the Warnings, lots of people (checks mirror) tend to turn the yellow warning mesages off.

1 Like

@Brian_Trotter Does Unity set it as a ‘Warning’ because it’s a run-time error not a compiling error? I would rather use a cleaner hierarchy if possible.

I don’t know why they set it as a warning. The way it is now breaks runtimes, so it should be as the same severity as a null reference error.

What you can do is immediately before setting the DontDestroyOnLoad(gameObject), add this line of code

transform.parent = null;

This will free it up to be set to DontDestroyOnLoad

1 Like

Awesome - thank you!

Privacy & Terms