Search Unity

Unity UI and mixing 3D: this is a blocking bogue

Discussion in 'UGUI & TextMesh Pro' started by OlivierPons, Sep 20, 2018.

  1. OlivierPons

    OlivierPons

    Joined:
    Sep 20, 2014
    Posts:
    28
    (Update) : I've extremely simplified the project : only one canvas, only 4 buttons, 4 planes, and zero code. You can download and see immediate problem here:

    https://www.olivierpons.fr/download/QualeeUBogue.7z

    There's a very important and blocking bogue here.
    I've followed many times that great tutorial here.
    The problem is that I want to mix 2D and 3D.
    I've made 4 Canvas and want the camera to turn around (this will give a "rotation" effect).
    Here's a bogue I can't fix, a picture is worth a thousand word.
    When there are too many GameObjects, the view gives this:

    bogue-1.jpg

    If you just remove Q_Text(10) then you get this:

    bogue-2.jpg

    And if you remove more stuff you get what you *should have from the very beginning*:
    bogue-3.jpg

    I need to make a working demonstration in 10 days, and this bogue is driving me nuts.
    In that demo I have to prove that the UI is very good!

    Here's the link of the problematic project, it has *nothing but GameObjects* (no code, no prefabs, nothing!), just open it under Unity (I'm using 2018.2.8f1):

    https://www.olivierpons.fr/download/QualeeUBogue.7z

    Any idea / solution / suggestion welcome!
     
    Last edited: Sep 20, 2018
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @OlivierPons

    well... I haven't used 3D canvases that much at all... but those too are AFAIK sorted by their "order in layer", not by like meshes.

    So if you create a geometric shape out of canvases, those won't behave and render like a box made out of planes...

    I think they still just follow their render order. If this is the case, you could change the order runtime.

    Edit:
    So if nothing else helps, sort the canvases based on their normal angle to camera.

    P.S.
    I too have many things that need to be fixed in time... but this is free community help forum after all.
     
    Last edited: Sep 20, 2018
  3. OlivierPons

    OlivierPons

    Joined:
    Sep 20, 2014
    Posts:
    28
    Well my problem has been solved this way: removed all my components, and re-adding them one by one in the right order, separately, very carefully. This is the third time I face such a problem where the problem is not on my side.

    So in general, as a rule of thumb (and I think this is totally unacceptable): if it doesn't work and it's based on elements visible in the editor (= not dynamically created), remove them and re-create them.

    The worst example is with UI and ScrollRect: the way you add elements changes the whole behavior. And please dont tell me "this is understandable because this and this". We, as developpers, dont care if you can explain why it behaves like this: we, as developpers, just want the behavior to be the same whether we add an element before of after adding a component like ScrollRect, ScrollBars or Layout element.

    For your information, I've made another demonstration for another company, where I had to show a list of input element, including a select box. But another bogue happened: when you change the font size, with big scale number (~50), the computation of the height is wrong and the last element is cut in half, which is so un-professional that I came to the final conclusion: my company is called "HQF Development" = High Quality Foundations. I can't sell things where the foundations are based on Unity. So I've voluntary given up on a 60k€ contract. I'll never sell unstable solution.