Shop in new scene cant find shop menu UI object

snicker

Member
My UI is loaded in a previous scene, when I switch scenes the shops in the next scene cant find the UI causing error in screenshot. I cant assign it in the inspector either on Shop Menu Opener or find it in the scene, I think the display panels are set up correctly so how can I fix this?
 

Attachments

  • shopUIerror.png
    shopUIerror.png
    192.5 KB · Views: 6
Your DisplayPanelManager (on the canvas of your ShopMenu) does have an ID of 1 right?

Try retyping the name "Shop Menu" for both the ShopMenu panel unique name and the panel opener making sure you don't have an invisible space at the end.

Looking at the code, the panel does find a DisplayPanelManager but can't find the ShopMenu inside. Make sure you don't have multiple DisplayPanelManager in the scene with the same ID.

Also you have other erros before this one. Even if they are unrelated, errors stop the flow of compuation so it can prevent unrelated scripts from being initialized
 
I'm trying to create my character at runtime and assign it to the DisplayPanelManager. Before my character is created I have a camera object that is the panel owner during the start menu panel. I was trying to reassign the panel owner to the character when its created then call Initialize() on DisplayPanelManager.

I can get it working if I drop the prefab in scene and assign it in editor, but how should I go about assigning a character created at runtime, if I'm using the DisplayPanelManager as my main menu UI when there is no character yet?
 
This is done with a component called the "DynamicPanelOwner". Simply add that to your character and it should just work.
 
Top