- Home /
Create an InputField in 3D space
Hi,
I would like to create an InputField in 3D space rather than using the canvas. I've tried using TMP_InputField targeting a normal TextMeshPro but am running into null exceptions with the Caret.
NullReferenceException: Object reference not set to an instance of an object
TMPro.TMP_InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, UnityEngine.Vector2 roundingOffset) (at Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_InputField.cs:3334)
Any workaround that would allow me to do this?
Answer by hawksandwichgames · Oct 14, 2019 at 06:44 AM
You can change a Canvas's "Render Mode" to World Space, where you can move it around and scale in 3D. You can have your InputField inside that.
Not exactly what I was looking for but this is quite good to know!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Renderer on object disabled after level reload 1 Answer
Force UI Input Field Character limit with C Sharp 0 Answers
How do I implement ServicePoint into my feedbackpage 0 Answers