In all canvas training videos in unity, when creating a canvas, blue dots appear that you can use to scale the object. I don't have any:
enter image description here
How do I add them? Maybe my settings are not the same
The settings are not different. I believe what you are describing is the Rect Tool. You can either select the tool on the top left selection by clicking the icon with 4 vertex points or when you have the editor open, click T and it will automatically swap to this tool. The points on your UI image will appear and you will be able to scale it using them.
Related
I'm working on my game and I want to add an inventory type system, when I added the panel it was a little transparent while the one in the video was watching was not. I didn’t see any setting for transparency in the Unity inspector for both the canvas and the panel. The UI mode is an overlay
I didn’t try much other than clicking all the check boxes, and I was excepting for the up to be a solid color.
If you have a Canvas Group in your hierarchy, it can come from here (Alpha property).
I needed to go to colors and slide this slider all the way up or down (the slider you need to change)
Hello so basically I want to fix my pixel art in unity and what i have found is that i should change the filter mode to point but the thing is I don't seem to have filter mode ( I'm new to Unity ) if u can help would be amazing ;-;
To properly setup your pixelart assets in Unity, you should change some default settings in the import asset phase.
In your project window, click the Texture you just imported and look at the Inspector Panel.
You need to change these two settings:
Filter Mode to Point (no filter)
Compression to None
You can also consider to change Pixel Per Unit setting, which basically is, as the tooltip says, how many pixels in the sprite correspond to one unit in the world.
This setting can help you to easily understand the correspondence between the dimensions of your texture/sprite and the units of Unity (it's an habit to consider 1 Unity Unit = 1 meter).
Of course, if you do this, you should chose a standard Pixel Per Unit value and use it in every texture/sprite you import.
This is found in the Texture Inspector.
Click on your texture asset in the project window.
In the inspector you should see all the options for your texture.
You can also do this from code
public Texture myTexture;
...
myTexture.filterMode = FilterMode.Point;
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
Hi I am trying to create custom buttons on unity (trapeziums). I successfully created the visible area on Photoshop and imported it as Sprite 2D UI as per the following image:
The issue arises, when I'm trying to select one of the buttons in game, their border overlap each other, since the transparent area is still being considered as part of the clickable button area. How can I remove this?
EDIT:
Practically when I import I want the squared boxes to not be counted with the image. I need the edges of the orange area to be cut flush with that and not the entire area(i.e. including the transparent boxes).
You may achieve this by using Alpha Hit Test Minimum Threshold. Take a look at this nice video tutorial.
There is one extra step that is not shown in the video but mentioned in the comments: you have to change "Mesh Type" to "Full Rect" and not "Tight" as it is.
Hope that helps.
The clickable area is based on the Rect Transform component of the GameObject. Adjust the width and height to the clickable area you want. You may have to crop your image in photoshop accordingly. If you select 'Gizmos' in the editor you can toggle viewing the click region.
I got a little problem with my Unity's canvas. I can't set the background image.I've added the Image component to the canvas and I've tried drag the image from the assets to Source Image, but it doesn't allowed that.
You have to set the image to a Sprite (2D and UI) in order to use it in the canvas. This is done by selecting the image in the Project window and making the change in the Inspector window, from the Texture Type dropdown. Make sure you hit apply once you have completed the changes.