Hi. I'm working in ORK Framework with New Unity UI. I see a huge problem with Screen Space Camera.

ORK Framework is just not finding my Main Camera.

Ok, so when I first decided to change UI render to Screen Space Camera - it worked ! But then suddenly, when I was preparing Main Menu, something changed. I didn't do anything "new" in Main Menu, i just changed some icons, buttons and font. When I click "New Game" and next scene is load, there is no Screen Space Camera in ORK Canvas.

So here's the deal - ORK is finding Main Camera for Screen Space Camera only when I'm using "ORK Game Starter Quick Testing". When I'm in MainMenu, ORK is finding my Main Menu Camera. But when I'm loading the testing scene - ORK is losing MainCamera.

There is one thing that may cause this problem. My camera is INSIDE Player combatant prefab. So there is NO OTHER camera on game scene. In "Game" window there is only "Display 1 No Cameras Rendering". I need my camera to be Inside player combatant prefab, because then I can make camera animations for runinng, etc. Funny thing is, that when I'm Quick Testing game scene - ORK is finding Camera inside Combatant prefab without problem. The problem is only when I'm loading new scene.

I was trying to use "Find Camera Settings" in order to let ORK know which camera I want to use - i was trying to find it through child, through name, tag, but nothing works. But it's not working. I don't know how it's working - ORK is trying to find camera only once on starting new scene? That explains why there is no camera on ORK Canvas when I'm loading scene using Main Menu, but why ORK Canvas is using Camera from combatant prefab then?

Camera in Player Combatant Prefab has "MainCamera" tag on it.

Please for help :)
  • Ok, I wanted this in my game quick, so I was thinking and I found a solution. Here it is:

    1. I created Camera on game scene and named it "UI_Camera". Settings for this camera:
    Clear Flags - Depth Only
    Culling Mask - only "UI" Layer (you need to change UI layer in ORK Framework settings to UI)

    2. "UI_Camera" has "MainCamera" tag.
    3. I created an Event called "UI_Camera" and assigned it to "UI_Camera" on scene. This Event is mounting "UI_Camera" to "GameCamera" inside player combatant Prefab.

    In this way, there is a Camera on scene right after loading it, so ORK is using this Camera for Screen Space Camera. And this "UI_Camera" is instantly mounted to GameCamera in player combatant prefab, so UI is visible for Player.
  • The screen space camera is set upon scene load, so it's mainly a timing issue due to the player (and with it, the camera) isn't spawned at that point - so there's no camera to use.

    I'll look into a solution for this in the next update.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you, it would be great :)
Sign In or Register to comment.