I want to change slider images on click of different tabs. all the tabs contain different number of images. so i want to destroy the old object and load new images in a new object. Please Help
The nested slider demonstrates a parent slider works with 3 child sliders.
Not sure if it is what you need.
Related
I have the following svg image (each circle has a different path)
and my app contains 5 classes,
I want to include it in my app so that when the user clicks on any circle, it goes to another page (navigate to new class) and each circle has a different class than the other
How can this be done in Flutter?
This might be a workaround if there is another way but my first thought is to put your SVG image into a stack widget and place Positioned gesturedetectors over each circle area. Then point each Gesturedetector to each class you have.
There might be more elegant ways to go about it but this might get you going till you have a better solution
My UI elements inside my panels are scaling fine with screen size, but the distance between my different panels is not. I have 3 panels in my scene at different relative position which i set at 1920x1080 reference resolution, and switching between them using animation. But when i change the game view resolution, these panels do not align themselves right. Here are the screenshots:
These are the panels at 1920x1080 which i set.
These are the panels when i set game view resolution to 2340x1080. As you can see, the "settings" panel is still fine but the "more settings" panel does not repositioned correctly.
The same thing happens when i set game resolution to 800x480.
Please help me..
The easiest way you can achieve what you are attempting to do is to use a component called GridLayoutGroup. Add this component to a parent object, child all three of your UI elements to it, and set the column count to 2. I can add an example in a bit, currently building a project.
Edit: Here is a gif example of the above solution.
I am trying to build an image slider for my app.
Unfortunately all the images are shown and not only the four images between the two arrows
In picture 2 you can see my hierarchy and in picture 3 you can see my settings for the sldImage GameObject
picture 2
picture 3
what do I have to do, that the images slide in from the right and disappear left?
unfortunately I couldn't find a solution for that so far.
EDIT:
There is no ScrollView in my components.
and if I add a Mask it is still the same.
You need to add a Mask.
If you add a ScrollView to your UI instead of a basic ScrollRect, you get a Mask for free.
Add it using the right-click menu in the Hierarchy Window, by choosing UI->ScrollView
I'm trying to show a ui panel using unity3d ,I have a main camera scene after i click a button ,i want my scrollable panel to show up
just like this
after i click the menu button i want the scrolling ui to appear like this.
It'd be great if someone could point out some kind of a tutorial that would cover this.
You need the following:
Image component - This is used to represent the items you want
to display
Grid Layout Group component - This is used to arrange those
image components you want to display.
Content Size Fitter component - This is used to make sure
that those Images fit in the Grid Layout.
The video from here should show you how to use these 3 together to get what you are looking for. To detect which Image is clicked, see this post.
I have noticed that in a canvas the elements are drawn from top to bottom so the image above is covered by the image below. The problem is that I want an ui image that is not the last sibling of the canvas to stay on top of all the others. How can I do?
I think you can try two ways.
First.
Use Transform.SetAsFirstSibling() to put the UI Component on top
Second.
Use CanvasGroup.sortingOrder to help your UI Component grouping.
Ref
http://docs.unity3d.com/Manual/class-CanvasGroup.html
http://docs.unity3d.com/ScriptReference/Transform.html
there are couple of functions you can use for setting orders
Transform.SetAsFirstSibling
Transform.SetAsLastSibling
Transform.SetSiblingIndex