GithubHelp home page GithubHelp logo

Comments (15)

mopsicus avatar mopsicus commented on August 19, 2024 1

Yeah, you should control visibility by yourself. Well, I close this issue.

from umi.

mopsicus avatar mopsicus commented on August 19, 2024

If you use TMP, you have to edit some code in scripts, else it will not works properly. Did you make it?

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

I had it working with TMP, but I still had that white box over the input field. With or without TMP, it's still there.

I don't have an android manifest file in my project? Could that be an issue? Where would that be stored?

from umi.

mopsicus avatar mopsicus commented on August 19, 2024

Screenshot at Jan 08 23-14-15

Did you change image background color of your inputfield? Try to set alpha to 0

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

I tried setting image background to alpha 0, it did not resolve the issue, there is still that white box over the input field.

Since my original image was transparent, I set it to the default input background, and the same white box is covering my input field.

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

It seems the issue arises in my main Scene, I tested by copying over all demo components to the scene my main project uses, and the same white boxes appear blocking and messing up the input. But if I build the project with your Demo scene setup and leave the Canvas and Camera as is, everything works fine.

I'm wondering what Canvas or Camera settings would have effect on this?

from umi.

mopsicus avatar mopsicus commented on August 19, 2024

You can test it. You have own settings in your project, so I don't know how it will works with plugin. You can change camera settings in demo and take a look.

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

I looked threw other Issues on this project, and I had to set the alpha of the "input" field to 0. Now there is NO white box over my input.

So basically the issue is fixed, but my text (that i input) is either super small or non-existent right now. Should I open up a new issue?

from umi.

mopsicus avatar mopsicus commented on August 19, 2024

Font size calc here. So, check your input field again, maybe your forgot to tune smth again :) Demo seems works properly.

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

Probably so 😆.

My Input field is in a Grid layout, that probably causes some issues.

I also tried the solution from here, It showed no promises, I tried switching Canvas from Overlay to Camera and vice versa, but that also had no effect.

I also tried to multiply the ratio by a large number, but that didn't seem to change anything.

I will relook over my Input field rect size, mess around with grid layouts and try and figure out what I messed up again! 😄 almost have it working.

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

Well I've hit another brick wall..

The caret is super small and no matter how much text I add to the input field, it still doesn't show.
The text is there, when I hit enter it tells me what I typed, but I can't see what I typed in the Input field.

This image is what I mean, I set it up for TMPro.

I verified my project settings and built the Demo in perfect working order with my projects project settings.
I copied the canvas settings to my projects canvas.
I copied the Input Fields to my project and I still got the same issue (the image i linked)
I tried all those issues, with and without TMPro.
I tried with and without Grid layout elements and all that stuff.
The text alignment was set to the middle, but moves top left.

The text size seems to be equal to zero or something.

I'm at a lost cause with this right now, messing around with any variables showed no sign of it working.

from umi.

mopsicus avatar mopsicus commented on August 19, 2024

I think it might have something to do with your TMP refactoring.
Can you upload your file with refactored code?

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

Here's the modified file for TMPro: MobileInputField.cs

I got both results with or without TMP, but your most likely right, I might have missed something.
It feels like this issue comes down to the size of the textbox, or rect so to speak, setting values myself and seeing results sorta hints me that something's wrong with the math in runtime. If I could set my rect size manually maybe everything would set into place? I don't know where I would do that in the script.

I have made some headway's regarding text size, but there are other issues now.

Fix for small textsize:
I set the fontSize equal to 100 (or any font size that you need), and the text actually shows now, that fixed that issue.

Issue #1:
The text is off center now, half the text is cutoff by the top.

Issue #2:
The text is shown above everything else, this really doesn't matter in my project, but for future sake, it would be great to eliminate this. I did try making a new layer for my overlapping object, but that didn't help.

from umi.

mopsicus avatar mopsicus commented on August 19, 2024

Your code seems to work..
About small text size, it could be cuz some camera settings, need check.
Your issue 1 and text size seems is linked.
Issue 2 can't be fixed, I guess, cuz native input create above all other UI and UnityPlayer view.

from umi.

Jared-Gross avatar Jared-Gross commented on August 19, 2024

I managed to solve the text size issues.

FIX:
The problem was, that my UI's scale was set to 0 when the app starts, I manually inputted the rect size, and everything works except one more small issue.

The input doesn't disappear when ever the parent object is set to hidden. It doesn't seem to update when the scale of the parent gets changed. I could disable the Input when I please and hide it like that,

If there no way to do that, then you can close this issue as the problem I had is fixed. Unless there are other notes that we can leave.

So to sum up for future viewers.

  1. Check your "Scale" size of parent objects, or the input object if your text is super small.
  2. Make sure alpha for the "Input field" is set to 0 if you have a white rect covering the Input Field.

from umi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.