Text field with spinner control in Unity - unity3d

I want to implement an Edit box with a spinner control in Unity.
Something like this:
I couldn't find an off-the-shelf component for this. I've also looked up the Unity Forums and haven't found anything relevant. Does anyone know how I could do this?

If you do not find something fitting on the asset store either (there are some comprehensive UI libraries), create a textfield and two buttons. For the arrows you could use special Unicode symbols which are supported by TextMeshPro UI Text renderers. The script to make use of the buttons should be fairly trivial.
Don't forget to turn it all into a prefab for reusage.

Related

TextMesh Pro Area Type Feature like in Illustrator

I was wondering if TextMesh Pro has plans for adding a feature similar to the Area Type feature from Illustrator pictured below, basically having the bounding box of the text object be a custom shape or dependent on something else? There is the option to make your text fit the geometry but that does not seem to be it.
If there are no plans in the near future to make this feature, is there a way for me to look into the specifics of TextMesh Pro and try to make it myself? As far as I've seen I'm able to access some (?) of the source after downloading them from the package manager, but I don't really have an overview of what works with what. My guess would be that I have to look at the parts of the code responsible for creating the yellow bounding box around text objects, but I'm not able to find where that is being done. Alternatively, I'm also looking for how text alignment is being done as my problem does not need an as sophisticated solution as area type objects, just a specific way of formatting the text.

How to implement Drag and Drop using GWT with touch gesture

Need to implement drag and drop using GWT with gesture :
Use case: like if we drag a panel with touch only its shadow image (or some grey box) start to drag from there with original panel being at its original location and we should be able to drop that shadow(or pseudo box) at desired droppable pane and some pop up should come up.
My advice is to not use any library for this.
Since browsers change, sometimes these libraries get broken. When you are using these libraries all that happens inside is some black magic and you will have a hard time to fix.
That is why I always implement DND myself. Also basic DND is really very easy to do and only a handfull lines of code. A library is overkill in a lot of situations.
Anyway. Over at G-Widgets a nice guide of how to do DND yourself is available: http://www.g-widgets.com/2015/12/24/drag-and-drop-using-gwt/

3D Text visible from all angles

I'm making a soccer stadium, and I want to write the stadium name on the entrance of the stadium. But, when I'm in the stadium, or somewhere else, I also see the text. From all angles.
I know the help pages of Unity about 3D text and I read a lot of questions and answers about this problem. But I just can't fix it.
I tried to add a shader to a material, and I added the material to the 3D text, but then I can't add a font texture. I have the Arial font in my assets folder, but when I press 'select font texture', this font isn't in the options I can choose.
Isn't there another option to write text on a wall, on a way you only can see it from the front?
So, on the second picture I should't see the text:
Please don't think I'm lazy and I didn't Google, because I have searched for hours. But I really don't get it, it's probably something really stupid but I don't know what I'm doing wrong. I'm a beginner with Unity, especially with shaders and importing/adding fonts.
You can try https://www.assetstore.unity3d.com/en/#!/content/84126, its free and it will give the text in a form of mesh, so it will be just like any other gameobject, you can interact with it, use physics on it, etc.
There are multiple possible solutions, but the main ones are these:
You set the Canvas for that text to world-space.
To implement this solution, you can follow the official tutorial on the subject.
You can use a text-to-mesh conversion plugin.
There are many to choose from, but one that was officially acquired by Unity and is used by most indie developers when they need such functionality is Text Mesh Pro.

How does one create a component which can effect things outside of runtime?

So I want to make a custom component. One of the functions I want to have is the ability to create and modify set of points that make up a circle. For example, specify point count:10, and on field update, a circle made up of 10 triangles is drawn in the editor.
Then I want to be able to drag the vertices of the created circle. I feel like I might be able to do this during runtime, but I'm curious how to do it out of runtime. For example, the built in "Box Collider" component has a button that allows you to edit the collider size in the editor.
I looked around and can't find a resource - I feel like there has to be a place for this.
Thanks.
You can execute scripts like if you were in runtime using the [ExecuteInEditMode] annotation at the begining of your class.
Check out the documentation here
For the functionality you want, you have Handles, to manipulate objects properties.
Also you'll want to develop visual aids for your tool, so you can accomplish this using Gizmos.
Google "Custom Editors for Unity" - there's a whole section of the docs for this. You have a wide array of options, from the simple to the powerful.
I recommend catlikecoding's tutorials, that are clearly than the official docs, and take you through the process step by step.
One of them almost exactly describes your situation:
http://catlikecoding.com/unity/tutorials/editor/star/

iPad SDK for 2D graphics and gui elements?

Im looking for some sort of SDK or library on top of iOS, which might help me produce iPad/IPHONE games.
The sort of functionality Im looking for is..
GUI elements, skinnable buttons, lists, dialog boxes etc
Any routines to help with tile based games
Functions to paint and move sprites
Any vector libs to help with rotation, skew etc
Im confident I could write all this from scratch, but Im guessing theres some libraries already out there. Im not afraid of getting my hands dirty in code, so please dont slate me for asking for prebuilt stuff :)
Thanks
The defacto answer is cocos2d. Open source, MIT licensed, sprite library (including tiling map support baked in).
As for UI - Cocos has some helper utilities for dealing with UI elements, however its not very hard to skin UIKit (though the more customization you do the more drawing code you end up with).
most of the bits are already available in UIKit, but http://www.cocos2d-iphone.org/ is a framework worth looking at for game dev.
Two notes about cocos-2d:
- cocos has its own implementation of UI control called MenuItem. It can be used to easily emulate the behaviors of Buttons. There is also a simple layout algorithm to dispose this items in columns, rows, grids. There are also other controls that allow you to display text on the screen (labels). No text editors though, AFAIK.
- cocos can be easily integrated with the rest of UIKit, so it is simple to show standard "message boxes", some UIKit elements on top or behind it. I was able to use the cocos view as the child view of a UIImagePicker, for example.