fungus

Open full view…

Help with View commands...

vlaxep
Wed, 18 Oct 2017 10:47:41 GMT

Hi, Haven't used 'Camera' commands before, and I'm having heaps of trouble get changes of view to work. Something is stopping the view changes to work. I really can't work out what is causing it, very frustrating! So I feel as though something to do with my camera or game view setup may be causing the problem. For example, when I use the 'Fade to View' command, the screen fade effect works as expected, but the actual view does not change size/position/zoom to where it should based on the Scene tab. It seems as though somehow it is locked to the the default view. I am really interested to know what the 'View' commands and 'View' game objects are dependent on. ie. - does the view you are moving to/from have to be within the view area of the same camera? - do the views have to be within the same canvas? My flowcharts commands operate correctly, by the way. Cheers, Vlax

wolfrug
Thu, 19 Oct 2017 18:42:00 GMT

Remember there's a difference between scene and UI objects, especially if the UI is in "overlay" mode. The view moves the camera between objects in the scene (see if they have a Transform, not a Rect Transform, component), while the UI remains static. Think of e.g. health bars and such in first person games: that's what the UI does. You can however also make a whole game in the UI, but then you need to move the UI objects, not the camera, to simulate movement.

vlaxep
Sun, 22 Oct 2017 04:29:41 GMT

Thanks. I managed to fumble through and kind of discover this. Still not fully understanding it but I've managed to get things to work better. The Robles I still have though, is I am using views to move between varying menu backgrounds, then fading each UI Canvas set in and out on transition. But upon fading them out, I have issues with them still being physically there and blocking interactions with other UI elements even though I'm making them uninteractable after fading out. Cheers

vlaxep
Sun, 22 Oct 2017 04:32:04 GMT

I have tried using Destroy, but this adds the difficulty of having to respawn with exact cords. Is there a simpler way, ie moving objects to lower layers or something else? I also tried removing collider, but the objects still seem to interfere

vlaxep
Sun, 22 Oct 2017 04:38:16 GMT

Or is there a Flowchart method of choosing which Button, UI set is the active one? Any advice on how to organise my different UI sets would be much appreciated! I have a Main menu (Buttons: Start, Options, Achievements) Options Menu (Volume and Back) and Achievements (Only a Back button at the moment).

wolfrug
Sun, 22 Oct 2017 16:52:29 GMT

Heya! Fade them out, sure, if that's the effect you want, but after that you should deactivate them (Scripting -> Set Active, iirc). This is the same as deselecting the little checkbox next to the gameobject in the inspector. Since you already seem to be using several different canvases, you just have to deactivate the parent canvas, and you should be set. Another trick is to deselect "raycast target" in the Image or Text component; this makes them no longer block raycasts (i.e. what happens when you click the mouse - it sends out an invisible ray that is then intercepted by the first thing that is set to intercept it). Note that this is also what makes buttons work, so avoid disabling it on them :-D

vlaxep
Sun, 22 Oct 2017 22:31:01 GMT

Thanks Wolfrug, that sounds like exactly what I need. Great tip too on the parent canvas, very handy to know! Will try this and report the result.

vlaxep
Mon, 23 Oct 2017 12:13:25 GMT

Worked a bloody treat, thanks a lot Wolfrug!! Another hurdle jumped