Show a select emoji screen - unity3d

I am doing a game with Unity3D in which there are 2 players using the same mobile device in turns to play.
I am adding a Settings scene in which each players enters his/her name and can select an Emojicon to use as an avatar in the game.
I have already imported the png file in to my Resources folder and cut it to 80 sprites using the sprite editor called emojicons1_0 to emojicons1_79.
What I need is to enable the players to change the default emojicon in the Settings if they touch the existing emojicon or a button "Change" beside it.
I was thinking of showing a scroll list from the asset called Gamestrap UI and display an array of 4 x 20 emojicons, and they can select there the desired emojicon. I don't know how to do this, and I appreciate any help. I am open to other suggestions of course.
Thanks in advance for any help.

if you are using uGui, there is a number of ways to do it. I would simply create a view prefab, which will composed of scroll list with grid layout inside. It will have a script attach, which will initialise the view by loading textures/sprites and set it to image component of an instantiated button prefab, which represents one icon to select. Then view has callback and on click simply call it with selected image.
Here is references:
https://unity3d.com/learn/tutorials/modules/beginner/ui/ui-scroll-rect
https://docs.unity3d.com/ScriptReference/UI.GridLayoutGroup.html

Related

Delete button for object - MRTK

I have a question regarding Unity and mrtk. I need to create an object, which can be deleted via button push. This button should be attached to the object. Now there is the app bar which can be attached to the object and which is very convenient because the buttons are only displayed on the side of the object you currently look at. However the app bar does not seem to work properly with the new bounding box and after deactivating the adjust button on it. So my question basically is, how do i make a button which is attached to the object, hovers on it and is only displayed on the side of the object i am currently looking at? The script of the app bar is very poorly commented, so i cannot figure out which part is responsible for making the button appear on the correct side and correspondingly how to write a script displaying the delete button only on the correct side (following the direction i am currently looking at).
To solve this problem you need a free Canvas that attaches to your object. This Canvas should be adjusted to the dimensions of the object and always look at the camera. To do this, first create a canvas and set RenderMode to World Space, Remember that you have entered the Event camera reference.:
After completing the canvas, make a button like the one below and place it in the body. In this section, adjust the dimensions so that you want to appear in near of your main object.
Finally, I suggest using Look At Constraint to match the canvas and the view to the camera. Insert the camera as source and fix Constraint settings it as shown below.
Example Result

Displaying an image on Unity's timeline

I am looking to create a Unity timeline tool that will display images onscreen in the manor of a story board, one after another, I have the display part down but I would love to be able to preview the image that is being shown on the timeline itself
any tips or pointer you can give me will be appreciated.
Select the object that contains the PlayableDirector your scene hierarchy.
Select "Preview" in the timeline and,
Use the "Scrubber" (the white vertical line) to move through the timeline sequence.
The "Game" and "Scene" window will both display the animation while out of play mode.

I need glowing outline around button in unity

I am working on a project in unity5, while I am making a menu contain buttons, I need button to make glowing outline, need help in this regard.enter image description here
same in the picture, I need button like this in my Unity 5
if you are using canvas you can do that without using any functions or events it can be easily done select button in inspector you will see button (script) component set transition to sprite swap and drop the desired sprite in pressed sprite box.

Unity3d: How to create a sliding(by touch) list?

I need create a sliding(by touch) list in my mobile game. It may be something like in the following picture:
By touching and sliding downward, the rest of the list would be shown.
Add ScrollRect component to the GameObject you want to make scrollable. Here's Unity official tutorial about how to use it.
Here there is a youtube tutorial how to make a basic sliding menu.
For list element, probably you will need more than a button. If this is the case, you can create an empty object name "listItem" and design a list item with texts, buttons, images etc. After that turn this object into a prefab.Then you can add element layout to the listItem instead of button as seen in the video. Here there is an example screenshot:

iPhone: Drag to make a new object

Im making an iPad app that will have some objects on the screen in a menu area. I want the user to be able to touch down and drag from one of these objects to place a new copy of that object on the view.
To further explain, say I have a checkers chip on the side of the UIView in the "game piece" / menu area. I want the user to touch down and drag from that checkers piece to drag a new checker piece onto the game board. I dont want the original checker to move, its just a place holder, but I want to create a new object that is dragged from the first checker.
I see a couple of ways to do that however I cant figure out how to do it without the user picking up their finger to reselect the new game piece. I want the new piece to be drag able immediately after touching the first place holder object.
Any ideas? Please and thank you for the assistance.
I've solved this before by creating a copy of the UIView that I wish to move, then using the UIResponder API (touchesBegan, etc.) to move the new copy in its superview based on the drag gesture translation, thereby leaving the original "menu" view in situ. Does this make sense?
When you create the moveable copy, you can set its alpha or create a border or some other visual confection to indicate the provisional nature of the drag object.