Forum rules - please read before posting.

Getting Camera to Render Unity UI prefab

Hey Chris,
  I was finally able to create a custom unity UI but I cannot get it to render within the view of my custom camera.  I know it spawns during the game because after the Actionlist was activated, I paused the game and saw it in the scene view floating above my scene.

I'm also checking the unity forum in case that's a Unity issue but I'm just seeing stuff about rendering textures as of now.  Help me.  Thanks

Comments

  • What is your Canvas's Render mode set to?  You'll have to give more detail about how you've set it up, as well as about this custom camera you've got.

    If you're not looking to make a World Space UI (i.e. one that works in 3D), you might want to take a look at the supplied Demo UIs, which are basically Unity UI versions of each of AC's default menus - they can be found in AdventureCreator/Demo/UI.
  •  Thanks @Ressie

    The mistake I made was putting the actual canvas to 'Linked Canvas' 

    :D

    Good stuff!  It works now.

  • I have a small issue.  Although I get the UI to show, it only pops up for a second then disappears.   I tried creating both actionlist to run during the game and also during the cutscene and it still only shows for a second.  

    I'd like it the menu to remain visible until the user presses the 'i' button.  I've already set up 'i' as an active input so that's fine, but getting the menu to remain visible is the problem
  • What is your Menu's "Appear type" currently set to?

    Also, it's not clear if this is because it's a Unity UI, or the menu's properties in the Menu Manager.  Try temporarily changing it back to a regular Adventure Creator menu (just give it a background / size so that you can see it), and see if it then works.
  • It's a Unity UI and its render mode is set to 'Screen space overlay'  

    The appear type is set to 'Manual' and I tried other settings as well but they didn't work.  
    I'll try what you said and will let you know.  However the reason why I wanted to use Unity UI is to have a scrolling text list.  If I can get the AC menu type to scroll text as well then I won't need to use Unity's.

    Thanks
  • It may be that the ActionList is getting run twice rapidly - test this by inserting a 1-second pause after each Menu: Change state Action.

    Your screenshots still suggest you are using Unity UI.  Again, change it's Source to Adventure Creator first - AC won't be able to have scrolling in the same way, but we need to determine the source of this problem.
  • Ok thanks, I'll edit that and test.  
  • So the adventure Creator menu works fine; it's definitely a Unity UI issue.  
  • And what was the result of the 1-second pause, when set back to Unity UI?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.