#🖼️┃2d-tools
1 messages · Page 14 of 1
Are each of the sprites skinned to the same bones?
nope
end up create one sprite for each
I think they have to have the same bone reference. If you only have this one difference between the sprites just import the psb with both variations showing and skin them both in the same model. Then you can drag it to the scene, hide the object showing the one you don’t want, and add a skinning editor and sprite library to the one you want to use. This might depend on what specifically you want to do though.
hmmmm okay thank
You should also check out the 2D Animation Samples, they’re very helpful examples https://docs.unity3d.com/Packages/com.unity.2d.animation@6.0/manual/Examples.html
thank much
I am having trouble with some collisions for my 2d game
ive never had this issue in 3-D space
The car isnt even touching the barriers, and it destroys my rotational "momentum"
Can someone explain whats happening here? I create a "hexagonal flat-topped" palette and it shows the palette rotated 90 degrees clockwise in the view. It appears pointy topped but the tiles are all still drawn correctly when i paint onto a tilemap.
Another quick snippet showing that original palettes and how it shows the orientation correctly when painting. I was building the game on 2022.3.22f1 and everything is working. I tried updating to 2022.3.40f1 and ran into this issue. I decided to roll back at the time. Now with the runtime fee reversed I felt compelled to update to the latest - but still have the same issue. When i look at the project manifest there is no change to the tilemaps library, there is a major version bump to the tilemap extras package in the lock file.
Can anyone tell me why this gap is there in the spritesheet? We are using .aseprite file
these are the settings
please reply with @shrewd folio
Okay I don't really know where to put this so it is going in here. Essentially, my problem is that I have a 1bit sprite that I'll attach, and I feel like there has to be some automated way to get the polygon collider for it. Especially because it is literally just squares. But I have looked into creating a custom physics shape from the sprite shape and all that but I run into a problem: the bounding box decides to be just a little bit too wide. And so the polygon collider is too big and that is obviously something I would prefer didn't happen
Here are some pictures
unlike a mesh collider, the polygon collider requires you to place the points manually AFAIK
Polygon collider when assigned takes the sprite's physics shape
You might try the 2D Pixel Perfect Collider script, but since it's meant pixel-scale sprites it's possible it gives you trouble with a sprite that large and with some stray pixels you have there
Alternatively you might enjoy using Tilemaps instead for level design, and tilemap (+composite) collider while at it
Even if just for the collider part, adding visual flair sprites later on top of it
thanks for the correction, i didnt know it was like that
As far as I know it's the only thing physics shape is used for, and won't do anything without the polygon collider
Sorry, I'm new to Unity, so I'm still figuring out the basics!
I made a rule tile for a house, and I'm trying to add a door tile in front of it. But if I add it on the same grid in the hierarchy, the three rule tiles around it change.
So what is the best way to solve this? Make a new grid on top? Not sure how to override just a few tiles (the rule override thing I saw online doesn't seem to be about this)
Typical way would be a second layer, yeah.
Oh but the layer below would still be a rule tile (so the bottom of the door will have a wood wall tile, instead of a flooring tile)—is there a way to override individual rule tiles while preserving the rules?
Or what is the best way to do this?
From what I understand, only by extending the rule tile
The rule tile script is meant as more of an example, and isn't super complex logic wise
fellas I've got a question
So, I'm trying to make a 2D Level editor for my platformer. The game utilizes spriteshapes (cause tbf, they're better for the game's purposes than tilemaps) & I'm trying to figure out how to like
modify the spriteshape's ... shape in runtime
Kinda aiming for something similar to this
Any clue how I can make something like that? I'm really confused & idk how to even begin to code it if I'm honest
and I honestly don't know if this is even the correct channel, considering this is inquery about a 2D unity tool's inner workings
First you'd look up if the sprite shape API has methods for letting you modify it at runtime from scripts
The rest is using them to create new vertices, to select them and to move them
fair enough
I'll return here if I get stuck (which let's be honest, it'll happen quite soon)
in the mean time, thanks!
Would it be possible to add enimies to tile maps, so I dont have to drag and drop each time (for a 2d pixel art game)
Or at least have grid snapping for my enemies
I found out that I could make my prefabs snap to a grid with ctrl + backslash. It seems to fix the solution, however, I would love to know if anyone has other ideas out there
This is going to sound weird, but that is actually located on the Rigidbody. There is a function that returns the Sprite Outline. The reason is to have an outline generated for things like manually checking if colliders overlap or not.
Let me find that function name. It has been a while since I used it so can't remember it off the top of my head. Going to dive into the documentation really quick for it.
Okay if you are still looking into the. Unity has two functions now in the Collide2D and Rigidbody2D class.
It is called GetShapes().
This returns the PhysicsShapeGroups which is the respresentation of the physics geomentry generated by a collider or a set of colliders.
It allows you to quickly grab the calculated shape of a set of colliders.
It can also tell you what type of shape it is so for TileMap colliders with the edge mode on it returns a set of edge shapes.
With the ShapeGroups return from the GetShapes function you can grab the vertices of all calculated collider edges to make your outline.
Here are a couple links for a lot more information.
https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Collider2D.GetShapes.html
https://docs.unity3d.com/6000.0/Documentation/ScriptReference/PhysicsShape2D.html
https://docs.unity3d.com/6000.0/Documentation/ScriptReference/PhysicsShapeType2D.html
Trying to fix an issue I've been having since the start of this project. I'm trying to make a 2d top down game. I've followed a few tutorials but everything only seem to work on the first launch or not at all.
There are cuts inbetween my tiles, I've tried shrinking them to put them closer together with cell gap and finally found that adding them to an Atlas works but now that I'm adding more to the atlas it's throwing an error and the grid squares are getting cut again. Do all the files inside the Atlas have to be the same type? Some of them are PNG while the others are aseprite. Removing the ones I added doesn't fix the issue and I'm seeing nothing online about it.
Console error is SpriteAtlasManager.atlasRequested wasn't listened to while SpriteAtlas requested.
Console error, grid cuts, and atlas settings included.
Incase anyone else is having the same problem. Unity as an engine understands what a Aseprite file is but the Sprite Atlas doesn't. Changing over to a png to match the rest seems to fix the issue
Sprite Atlas itself isn't what fixes the color bleed issue
Its "padding" feature is, which you can do directly onto the sprite file if needed
Aseprite has a similar automatic padding feature when exporting a sprite sheet
The seam that forms because of color bleed is a separate issue from the seam that forms because a positional gap appears between the tiles
It happens because floating point coordinates are not pixel perfect, thus can't guarantee that tiles are lined seamlessly next to each other
That one is what tweaking the tile PPU or grid size are a potential solution to
Though the "true fix" is to use pixel perfect rendering
How would I turn on pixel perfect. I feel like I remember seeing that but I don't remember where
It's a component in a package https://docs.unity3d.com/Packages/com.unity.2d.pixel-perfect@5.0/manual/index.html
It's also a whole workflow though, as to work properly your assets have to be designed for pixel perfect rendering
Or in other words to have a scale that makes sense when rendered at native resolution
Got it going today. Turns out I already had it installed and was already setting everything to the proper values. Seems to be working, thanks Chief!
Hmm, it looks like normal maps in for 2d lights are fully broken in LTS
I'm trying to figure out exactly when it happened so that I can go back to the version prior to that
It looks like positive X and Y create significantly more light than negative x or negative y even if the normal map is flat
In 2021.3.43f1 normal maps behaved like this, as expected.
Whereas in 2022.3.43f1 they instead behave like this. When the light is illuminating something up-right the normal maps seem to stop working and it just illuminates extremely brightly
Note that these are fully round, identical lights with no direction
Did unity change the base color of normal maps or something? Here is how light appears to apply on a flat surface with normal maps
This seems what you typically see when neglecting to set the normal map texture type to normal map
Perhaps you didn't neglect it, but it could be a clue that the texture is not being treated as a normal map
Why does the middle text and the lines look so horrible? (Dont worry, this wont be the final graphics, just prototype - I want to have a working game with all the features I want before I start drawing proper graphics)
Are you using text mesh pro?
yes
Show the componany. Also make sure you haven't scaled the object.
You mean scale it away from the default size it is when I spawn it in? Of course I have, how else was it gonna fit on the button on the wheel?
That's what the font size is for. But anyway, show the transform of the object.
Is it possible to set the Sprite Atlas packing to "0 padding"? 🤔
Default lowest is 2.
Not that I know of.
Usually you wouldn't want 0 padding since it nearly guarantees color bleeding between sprites
I gotcha.
Probably won't go down that route then.
But, if anyone was curious -- I figured out you can just open the meta file and change it to 0 in there.
But yeah, even if you could it is a bad idea usually.
Is there a way to use one Spline Shape for the walls. Currently, I use two Spline Shapes for the walls and the sides of the walls as I wanted an indoors environment.
hey could someone help me with setting up a tilemap for 2D, ive already made all the assets and have them in a tile pallete, im trying to make them dynamic but for some reason it wont work PLEASE HELP!!
nevermind i figured it out
Is this a good place to ask questions about turning parts of a tile map into sprites?
tiles are usually sprites to begin with
Agreed. I did end up using the Sprite Editor and drawing custom coordinates to cut out.
But am wondering if there was a more efficient way?
I don't see what's inefficient about it
It does depend on what you're trying to optimize it for?
I have this sprite/tile sheet. I want the structures as full sprites (custom outlines) and the ground types as tiles (uniform outlines).
I ended up importing the sheet twice and cutting it twice (once for each scenario).
@modest cargo forgot the reply (:
You should only need to import it once, then slice (or not slice) everything the way it needs to be sliced
Then use some slices for tilemapping, others as sprite objects
So I just need to get better at slicing?
#GetGudNoob
Is there a particular difficulty you seem to be facing with it here?
I now see that even though the "SLice - Grid by Cell' option is selected, I can delete areas of the slice and then manipulate them to be bigger/smaller/custom.
I thought it had to be set to custom for some reason. Assumptions 🤦♂️
Yes
Slices can even be named individually so you know what they're for
I see!
This makes it quite easy indeed
Thank you for your help @modest cargo 🏆 🍻
While you're being helpful, can you please remind me what the inner green slider is for within the sprite editor?
I understand the pivot point and blue slider.
Iirc they are specifically for 9-slicing, so the sprite can have separated corners, edges and inner area
Hard for me to understand the immediate use for this currently.
I'll have to go look up a video.
Thank you.
By far most of the time it's for making a specific style of UI window border
Could work for making resizable wall blocks too
Useful tips!
I do remember using it in a UI example.
UI is my weakness though. So luckily I'll leave that to my partner.
Hello, is there a way for me to separate these kind of file, Im new to unity
https://assetstore.unity.com/packages/2d/characters/3-direction-npc-characters-205182#content Download from this source and it compacts everything in one
Why do you need to "separate" them
Because in the file contains like multiple NPCS all in one
So I thought I would need to cut them one by one and seperate them
Seems they are already cut in your screenshot
That's what the individual sprites under the sprite sheet asset are
Yes
I can see included animations and animation controllers for them too to make it even simpler
There also appears to be an example demo scene included
What happened is whenever I throw in that file in
It runs all of the NPCs
I only need one at a time
I think its because that whole sheet is a bunch of NPCs
Idk how Unity works yet
By "throw that file in" are you saying you're creating an animation
And dragging the whole sprite sheet onto the timeline, rather than a selection of sprites from the sprite sheet?
There already are animations and animators though, so there should be no need to create them except for practice
And for practice you should be following tutorials pretty closely, such as from !learn
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
Unity has not been created simple enough to just jump in and start making stuff
This is not a complex task though, it just should be done in a specific way
And you need to know the difference between sprite sheets / assets and individual sprites / slices
yea i think thats what happened
I throw it in the scene
Is there a way to rotate just this one chunk of tiles?
I tried this but it didn't do anything
Is it the best practice to manually edit the colliders for most 2D objects (in a top-down game)? It seems that the automatically-generated ones aren't quite what I want
This works directly in the tile palette when editing the tiles.
I'm curious if it's possible to rotate tiles already placed in the scene?
I can rotate the entire gameobject that the tiles are placed in but thats all.
does anyone have any experience in using 2d sprites and adding normal maps to them for lighting depth?
You should assume so
ah - I misunderstood. You can change the placed tiles, too.
- Go to the tile palette and hit 'S' or push the select tool
- Choose the placed tiles in your scene that you want to rotate
- The inspector will show a "grid selection propoerties" section that you can use to rotate, scale, etc the selected tiles.
Here's a screenshot where I have the correct tool selected in the tilemap, tiles selected in the scene adn the inspector showing the rotational controls
You can see that three of the tiles are rotated
Pretty common. The auto-generated phsyics colliders aren't great even for simple objects (like a triangle). I adjust most tiles and maybe half of my sprites. It's a one-time thing so NBD
Have to run but will reply later!
Thank you!
Does anyone know how to create a new 'sprite cutting area' so I can cut out more sprites than outlines that are currently offered?
This worked great until I realized all the flowers in my sprite were then pointing sideways lol. But it worked well to make a nice template and then trace over with the original tile orientation.
maybe not sure i understand, but you can go to custom outline in the top left menu, then drag to create new sprites
How do I reference a sprite that is derived from (Texture 2D) PNG?
Everytime, the PNG with all the images is references, instead of one of the individual icons/sprites.
"Reference" in what context?
Custom outline doesn't let you make new sprite slices, but custom outlines for existing sprite slices as the name implies
Outlines are used by the sprite renderer for generating geometry for each sprite slice
You should be able to simply click and drag to create new slices, or use one of the automatic slicing methods without "delete existing"
Not sure what else you might mean by "new cutting area"
How can I kind of "fit" a rectangular sprite to a circle/arc? something like this
or just make a graphic that is naturally rounded, dunno which one would be better
nvm, just made a graphic, works well enough
Anyone good with tilemaps that could possibly help me? I have a tilemap where the invidual tiles are 32x48. The full file is 256x256
When I import em and try to paint em using the tile painter they are offset (?) so that they don't connected to eachother. (If i lower the pixel per unit from 48 to 32 they just ovelrap eachother)
See pic included.
I guess you could change the grid size? By default the grid is square but you can set the x and y independently
This works super well this time. I think it was bugged during my last session.
anyone know whats up with this? i havethe tree trunk and its hole separate, they're both on layer 'Player' with a level of 7, if i set the hole to the first 2 sprites, its behind the tree but any sprite beyond 3 and its on top of the tree, as it should be. but all the sprites are identical in size so im not sure why the type of sprite affects anything
this could be solved by setting the tree trunk to a lower layer but it needs to sort with the player, so it must be the same layer as the player
nvm im dumb i just moved it down a little bit
What Colin said - you can make the grid rectangular, but ugh I would never want to do that. I have enough problems in my life.
Hey, I have a rule tile. These 2 parts of water sit on a different tilemaps
but on the same grid
why they don't connect?
Could I get some help with 2D Animator Layers. I wanted to avoid having to create multiple sprite sheets for the same slime monster sprite to add color variety. Ended up splitting the slime body and the sword stuck in it into two separate objects. Both have sprite sheets.
From how I understand it, an Animator component drives the sprite renderer component on the same object, so in my case, how would I have the second sprite sheet (the sword sprite sheet) play. Would I need a second object with a sprite sheet and animator (using the same animator controller)? Tried setting up the sword sprite sheet this way with its own animator component which uses the same animator controller as the body.
However it is only sorta working. When I enter play mode, If I have the sword layer weight set to 1, only the sword animation shows with no slime body visible at all and if I turn the weight down to 0 during the play mode, both body and sword show and animate properly. Vice versa, if I have the sword weight set to 0 when entering play mode, only the body shows. When turning the weight up to 1 during play mode, both player. I assume I have messed something up in my setup.
I can't seem to find any video or forum that suggests a solution to this and would appreciate any assistance o7
My current work around is setting the sword layer weight from 0 to 1 or vice versa on Start. Pretty sure i'm missing something though
is there a good engine, kinda like aseprite but free?}
Aseprite is free if you're willing to build it yourself.
LibreSprite is a free fork of it
Hi guys, are there any tool to separate some 2D sprites I've drawn into sperate pieces? I don't want to completely re draw my ship and player character to draw a thuster separately and the gun separately
Unity's sprite editor lets you make multiple sprite slices from one sprite sheet, and even precisely crop them with the custom outline editor
Not from a sprite sheets. Fram a hand drawn 2D image
You'll be importing it as a sprite / sprite sheet in unity if you want to use it in 2D so that doesn't make a lot of sense to me
I don't understand
What exactly?
I've imported a PNG player character sprite, my player is mostly basic shapes and without redrawing I want to snip, or cut, (I'm not sure the exact term) a segment of the sprite out and now have 2 separate sprites
Use the sprite editor as I first suggested in multiple mode
Not sure the best place to post this, but here goes. Forgive my poor terminology.
Using TMPro with wrapping enabled, I need a blank character that is regarded by TMPro as a normal character for purposes of wrapping the text. So in cases where the addition of another character would cause the line to wrap around, I need it to work the same whether I'm using a blank character or regular character. I have tried several different blank characters that don't behave the way I want them to. Some nearly work, in that the blank character is treated as a part of the word and not a space, but they only "work" and wrap the word to the next line if the word ends with a visible character.
Perhaps more straightforwardly, I need a blank character that generates a mesh
Use a regular character with <alpha=#00> maybe?
FOR A 2D GAME THERE SURE IS ALOT OF VECTOR3'S
I'm making a proc gen 2D isometric game in Unity. To handle height I was increasing the Z axis of higher tiles. However, now that I have a character running around with collisions, I realize the perspective is off when running "behind" a block with height. I saw some videos on this topic, is adding another tilemap with a higher sorting order for each "level" of tilemap the best way to do this? So far I have designed my entire loading/unloading logic around the basis of one tilemap.
Does aseprite worth it
Okay I am getting really close to getting something to work. Essentially, I have a lot of sprites that are just squares, and I want their rigidbodies to be perfectly aligned automatically. The way I am doing this is getting the PhysicsShapeGroup2d from the Rigidbody and assigning it to a customcollider2d. However I am running into a problem. I can't figure out how to assign my PhysicsShapeGroup2d to my CustomCollider2d. Does anyone know?
How Can I see my hiden tool is aseprite
@modern dirge There's no promotion here, read #📖┃code-of-conduct
is there a chanel for pixel art
No, there are no channels for art outside of unity context
You can ask here about how to use pixel art sprites in unity, or in #🔀┃art-asset-workflow about how to make pixel art sprites for unity
Need help with some 2D fundamentals.
I have a pixel perfect camera in this scene, but it's causing the characters to jitter and shake in a strange way when moving. Mario and Luigi are moving at the same speed, with Luigi at a slightly-offset position, but Mario is staying smooth and centered while Luigi shakes wildly. Why is this happening? Is there a solution to this? Something simple that I'm missing?
whhat would be the right prompt to design a paddle for my pong game. the ai litteraly draws a pong paddle, but you knwo i need something like in a pong game.
You could, like, just draw one?
I mean, its a freaking rectangle.
Possibly the single most easy thing to draw with a mouse other than a single pixel.
Who knows, maybe one of the chatbot AIs can explain that
Why have a human in the loop after all?
I'm trying to make a water reflection in a 2.5D game (top down-ish).
In a side scroller game you can just use a render texture camera and feed it into a shader. What about topdown or 3/4 top down games? Where the body of water can have complicated shapes (like a river). Would a similar approach work or is there a different way?
https://www.cyanilux.com/tutorials/2d-water-shader-breakdown/ this sounds like what you're trying to make
thanks it looks exactly right, and also uses the same placeholder asset pack 😅
yo i have a small question how can i make it so my 2d sprites will get the same size as the screen on each screen size. Because currently when ever my screen gets smaller it will just cut out everything
current camera settings:
Small answer is that you get the current screen size and use that to set the scale.
I haven't done it, but seems like changing the camera size would be easier than changing the scale of every sprite
Camera size is relative to screen height, everything should scale along with screen sizes
In what circumstances is the screen size changing so drastically?
If you want a lot of control over scaling of 2D objects, a Canvas provides the most options for it
Canvas objects are quite different from sprites though
Tanks, it worked, i have put everything in a canvas and changed the screen size
Can someone help me with rule tiles im trying to get a slope working but it just does the boxed edges. I know if i more the slope tiles on top of the boxed edges they will appear but it doesnt set right
when i move them to top they look like this
I had this problem https://discussions.unity.com/t/ik-character-help/1534149Anybody but solved it with this script
https://hatebin.com/lnynamqfvs
but now I have another problem
(character is IK driven and this is the only script I use)
Start from breaking the issue down and understanding what's happening. Pause and go frame by frame if needed and debug the relevant values. In the worst case, it might just be something about how the package works. In that case you would need to look for a workaround.
I tried stopping the game if its about being exactly above or under the reference point
but that didnt work
I also check if the tip of my left arm on the left side or the right side in the update
What didn't work and why?
Game didnt break
Then it might be an issue that only happens at certain frame rate. If you can't go frame by frame, then just debug some values to try and understand what's happening.
{
// Check the distance between the weapon and the character
float horizontalDistance = Mathf.Abs(weapon.position.x - character.position.x);
if(horizontalDistance == 0)
{
Debug.Break();
}
}``` tried this one more time but same result
Think step by step.
- what do I know about the issue?
- it seems like the bones are moving sporadically between several positions when the target is at certain position.
- what moves these bones? How are their positions calculated?
- probably ik? It receives some values, like the bone previous position and the target positions and does some calculations.
- then it's either an issue with the calculation itself or the input values.
- don't have access to the calculation(as it's unity code), but can check the input values.
Follow a thinking process like that and you'll get closer to solving the issue.
Obviously, research thoroughly and confirm with debugging every step on the way. Don't just make assumptions.
Ok I found something about the problem
{
// Check the distance between the weapon and the character
float horizontalDistance = Mathf.Abs(weapon.position.x - character.position.x);
if(horizontalDistance < tolerance)
{
Debug.Break();
}
Debug.Log(horizontalDistance);
// Use tolerance to check for horizontal proximity, avoiding helicopter effect
if (horizontalDistance > tolerance)
{
SwitchEffectorPositions();
}
else
{
// Align both arms to the mouse position when very close
AlignArmsToMouse();
}
}```
I changed the value of tolerance I though it was a low value but it actually was a high one. I saw that when I debugged the distance value
if I have a tilemap using tiles that is say like a cloud, not perfectly flat, is there a way to allow the character to run on it as if it was a rect, ie i dont want him bumbing up and down on the cloud surface
Are you smoothing or LERPing Luigi's position to follow Mario? You might need to round off his position so that it's not a sub-pixel coordinate in that case. Could reduce jitter. Or just introduce entirely new jitter. The magic of pixel perfect camera.
Would you want your slope rule to look like this?
It's what your under slope one looks like
Does anyone have an Ideal, why that Parallax Effect looks so ulgy ? its my first time and i followed a tutorial. but the behavior of mine Parallax looks much more different to the videos Effect.
The things further back should be scrolling slower than the things in front. Looks like it's kinda backwards right now.
guys how do i make my camera follow me?
Sounds one of the easier questions to google
How would I go about making this slope more straight for the player to walk up and also not slide down when just standing on it?
I like this video because it explains slopes pretty well
Thanks I will definitely check that out
So no slopes lol
But if you decide to still use them after all that, I think it also talks about how to implement it pretty well.
It didn't talk about how to do it in that video
You can edit the physics shape of the sprite in Sprite Editor
I was having a minor struggle with Unity 2D textures, but the explanation & solution became obvious as I typed it here. Every part of this face is made of different sprites layered on top of each other and made a render texture. That alone was pretty complicated, but we're down to the last issue:
See that white gunk around the eyelashes?
It seems that semi-transparent pixels on the base texture lashes are not color masking appropriately.
The solution was to just mask off the black eyelashes as part of the red color mask because the semi-transparent pixels were the issue. Because they are black they don't matter to the masked area anyway.
Duh.
In case anyone else ever encounters this, here you go.
There we go, totally eliminated the problem. Just add color mask on top of semi-transparent pixels too.
I see some differences in the way people handle 9-slicing and was wondering if one or the other is the modern or "correct" way, see screenshots. 2 of them (from Unity) show the slices going towards the middle of the sprite un-evenly. Then the other way I most commonly see through tutotials and such just has a simple way of cutting it as close as possible towards the edges.
I dont know which I should be using to avoid headaches in the future when working with these
It's not to do with headaches, but determining how much of the border graphic does the corner have versus how much the straight edge has
The straight edge region is so small in the first example because the intention is to have as little variance as possible when extended
But if you want the pattern to repeat when extended without being repetitive, a longer edge may be appropriate
Just up to artistic preference
Ahh gotcha, so more contextual. I can see it now with the blue button having a gradient and the sheet shown having small details not wanting those extended
Whether it's extended by stretching or tiling also has an effect on which method works best for in a specific case
I am designing a game and I want each level to take place at a different time period, I really suck at art any good asset packs that just have anything and everything, wanted to do like a dinosaur level, medieval level, maybe future
Hey guys,
I'm currently working on a 2D pixel art sidescroller. The player character is going to do a sort of kamehameha fire beam looking attack.
As I'm creating pixel art for the game I created a basic fire beam that I can repeat and move in Unity Shader (Pic 1) - however when I put this texture into Sample Texture 2D it gets stretched to fill theentire texture square. I've been checking out the Inspector for the sprite, material, and inside the Shader but I cant seem to figure out why the colour is stretching the fill the entire material.
Any help would be great ❤️
It looks like you aren't actually using the alpha...
Thanks for the help 🙂 do you mean the blending mode Alpha here?
Oh no, wait, got it, just had to plug the Texture 2D Alpha node into the final output. Thanks 🤘
Anyone know why my Sprite Editor bones do not appear in the Hierachy?
Hello, how can I make a smooth picture blend transition? I want my picture to transition into another for four minutes in a way it blends between. More precisely, I need every pixel to slowly change its color for four minutes until it reaches the color of the pixel of the next image. And, for maximum optimization, I need the image to be updated every 3 seconds. How can this be done?
This is a separate window I guess (you cut the screenshot).
It might help to know what type of "picture" object you are speaking of
UI images?
Not UI
Then what exactly?
A cloud map, basically a texture 256x256 in .png format
It's obvious that it's a texture, but not obvious what type of object you're using it as or in what context
If it's not a UI image, it could be a sprite on a sprite renderer, or a nonspecific 3D material
Or something else potentially
Its not a sprite, nothing with UI. Its a texture that specifies clouds' type, density, type etc.. through red, green and blue channels. It is applied on a dropbox in post processing volume's effects
Post processing effects usually use shaders specialized for them for operations like blending two or more textures
So you'll probably want to pose the question in #💥┃post-processing with more detailed explanation
It's not apparent how your post processing effect works and not clear to me what a "dropbox" is in this context
This channel is for 2D tools and sprites
thanks for replying, another person helped me with this issue
Next time I hope you post only in the one relevant channel and start with a less vague explanation
Crossposting and making us guess and hunt for the real issue to solve is possibly the worst use of our time and yours
You don't seem to have added a sprite skin component.
hello ! I m currently trying to setup a dungeon generator ( BinarySpatialPartition + Delaunay's Triangulation + Kruskal Minimal Spawning Tree ), It's actually almost finished I just need to fixes the doors ( in black ) do you think there's a way to apply a ruletile to complete them even if the doors and walls are on differents tilemaps ? ( floors are blue and white, walls purple and doors black ) I m keeping those in different tilemap to apply colliders utterly
( doors are incomplete bc the way MST is calculated, could change that in code but actually not so easy )
Well, you can extend rule tile to take multiple maps into account but they don't do it by default. Since you are generating so much, you might be better off just having your generator choose the tiles.
welp I ll refactor all of this to get only one tilemap tho
thank u for ur answer anyway
I'm trying to set an outline for a polygon sprite, but I need the points to be exact. Can I somehow set their values to be the exact values I need instead of dragging them, or change the snap distance?
By code, yes.
Can I also change the snap distance so the point will snap every, let's say, the height of the sprite/2?
Like, make the point be on exactly in the middle of a side?
Well, to some degree of precision.
Anyone have any recommendations for 2D skeletal animation course for an artist?
That you're posting in the wrong channel?
Is their any way to use blender grease pencil for making 2d game assets in unity?
There are in fact many ways to do that...
Most commonly, just exporting as sn image.
Hello all, i wanted to make a platformer game with cartoonist art concept, and i want to ask is it better to make platform and spikes to tiles or be a normal game object?
Better is tricky, since they are both fine so it really comes down to what suits your needs.
Noted, thanks!
Not a course, but our e-book "2D game art, animation, and lighting for artists" has some pointers on how to get started. (https://unity.com/resources/2d-game-art-animation-lighting-for-artists-ebook)
I'm trying to figure out how to set up Animation Events with Aseprite importer. https://docs.unity3d.com/Packages/com.unity.2d.aseprite@1.0/manual/ImporterFAQ.html
I get the Animation Event in Unity, but it's read-only, so I can't edit any of the values. How can I reference/use it in-engine???
hello just wanted to get a quick understanding of PPU setting, just started learning and so i sliced a 16x16 tileset for the world and a 32x32 sprite sheet for my player and set PPU for to 16 and 32 respectively, but wondering why when i build the world through my tile pallette my world building tiles are basically like double the size of my Player sprite, did it scale to the max PPU?
I'm having a problem with new tilemap shadow caster, it is blinking and showing weird black lines, anyone got a fix for this?
Hello all, I'm using the blend tree to animate an enemy movement. Using a simple 2d directional Blend Type. For some reason the 'mirror animation' option cannot be selected. Does anyone know why this might be?
I didn't figure it out but I did find a work around by flipping.x in the sprite renderer
I am deeply confused why this happens
To use the animation events, simply add the event to a MonoBehaviour on the same GameObject as your Animator, and it will be called when the event is trigged from the animation.
E.g. if you add an event called "OnStep", add a method in a MonoBehaviour
{
Debug.Log("OnStepEvent");
}
I'll make a note to add a code example to the FAQ as well, just so the section describes the full flow.
Thanks!
Anyone know if this sort of blur can be done? Like a foggy window
can we draw sprites directly in unity or must we have a 2nd software for example "paint" to be able to draw
Unity is not a drawing program nor an image editor
You may find countless extensions online for that in unity but I highly doubt any of them is comparable to real image manipulation/painting apps so an external app would likely give you the most pleasant workflow
Is there a way to set explicit values for outlines in the sprite editor? Like, instead of dragging the outline, I set the value of its points to (1,1), (1,2) and so on
Didn't I answer that exact question from you recently?
Hello! Can somebody explain rule tile to me? It's for a college assignment and I'm asked to make a 2D level for a platformer by using and setting up ruletile in these formats: 3x3, 3x1, 1x3 and 1x1.
The first hit on Google:
https://learn.unity.com/tutorial/using-rule-tiles
Thank you, I saw this resource, but what I don't understand are the formats
Like 3x3 and such
Best to ask for clarification from your professor.
We can guess from context but there are multiple reasonable interpretations.
how do i get that crispness within unity
is it me or does it look vague when i put it in scene
See first link in the pinned messages, it explains how to setup assets as well.
so ive got tiles that are slightly bigger than the tileset grid size, is there anyway to make the bottom line up with the grid? I want to offset it up a few ppixels in the tile palette basically
i managed to do what I needed by changing the pivot of each image in the sprite editor
Is it possible to use vector art as tiles for a tile palette?
I have this 256*256 sized svg that I drew to use as a tile, but when I tried to place it as a tile with palette (with the vector graphics package installed), it accepted it but I couldn't actually draw it
Anyone up for answering this?
Can Smack Studio output a format that can be imported into unity. Not as a bunch of textures, but as a proper 2d skeletal animation?
Not without coding.
Then what's the best way to make tiles look clean regardless of resolutions?
Do I use Pixel Perfect for that?
No.
Either use multiple files for different resolutions, or a larger one than you need with high quality filtering
Damn
Unity's vector import still rasterizes it
So it is basically the same
It will not be resolution independent
Unless you made it out of spriteshapes or splines or something
Which software is best for 2d animated game asset creation for unity?
Define best
hey wondering what is a good approach for skill animations for an RPG, should i be attaching an animator to a Skill prefab. I am not 100% sure about this because it seems inefficient. The second thought process is having like a animation manager object with the animator
How could I make a buffering circle like the one on youtube videos, but with colors and as a sprite rather than a ui element
Doesn't sound too bad of shader effect but there might be some easier way too
I was thinking of the option to use it as part of the player
Hi everyone! I'm a Unity beginner and I'm trying to make a sliding ice cubes effect for a platformer, but when I hit play, my character doesn't stay, he falls straight to the bottom despite having the correspondent components. Already tried having the same X, Y, Z axis as the platforms, but that doesn't work.
Here are the character's components btw
The first pic I sent were the ones for the ice platform
have you checked the warning you hae there
Yes, already did it and it still doesn't fix the problem
I unchecked the "is trigger box"
I prefer timeline assets for skills but it varies a lot on the needs of your game.
Your player collider is set to trigger as well...
Triggers register collision but don't react to it.
ah ok, i thought timeline assets were for cutscenes
Think of the effect as a small cutscene if it helps!
Thank you!
Now it works
What I like is that it lets you handle animation, sound, particles, and script triggers very conveniently.
hey guys. how can i fix this offset with tilemaps?
You need to match pixel per unity to sprite resolution and grid scale
I haven't touched tilemaps in a while, there are tutorials for it on !learn, also blog articles.
But for tiles basically you need to match, if tile 32x32 at 100 ppu it will match grid scaled to .32 IIRC if you want to keep grid scale at 1 then you need to set sprite to 32 ppu. Experiment with it, or see a tutorial.
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
it's all free? all of those courses?
yes
wow!
Yaho!
I have a question about animation but its flipbook spritesheets so I figure here is better.
Is there any easier way to make animations out of flipbook spritesheets?
The only 2 ways I see now are
- adding keyframes one by one to an animator
or - letting unity auto-generate a new animator and animation for every single one, and then copying the keyframes to the animation I want and renaming the track
You can multi-select sprites in Project window and drag them all to an Animation timeline
Provided the object has a component with a sprite field
I will try this thank youuu
Hi everyone. I just released a free parallax scroller. Here is the link if you are interested: https://assetstore.unity.com/packages/tools/sprite-management/responsive-parallax-scroller-tool-301088 Also I would like some feedback 🙂
i have a tilemap layer where i can paint which tiles should kill the player. in the player controller script i can successfully detect a collision with these special tiles. but i want to be able to have logic depending on what special tile was hit. attempting to index into the tilemap for the tile is returning null and im not sure a good way to debug. is there a way to see in the scene editor what index a specific tile is at or? the position and index that print seem reasonable
figured it out. the cellPosition needed .y -= 1. i ended up just making a giant loop to see where all the tiles were
how come for this test tilemap im working on when im in aseprite it looks fine but in unity its off?
#1179447338188673034 so it doesn't get lost!
Thank you xD
Hi everyone, I am very new to unity and I have been trying to recreate World's Hardest Game using a tilemap. I have been trying to recreate level 1 and so far there has been a lot of trial and error. I didn't realise that 1 tile = 100x100 pixels in the beginning so my tiles were very small! Lol. Now, I'm trying to implement walls, so the player can collide with them later. However, this is proving to be a big challenge. I imported the wall texture with the transparent background, but when I tried to put the wall on the tile map over the level, it wasn't really transparent. It just had the grey background. Is there a way to fix this? Thanks. Also, idk if this is the right channel to post in.
nevermind, I fixed it by creating another tilemap just for the walls
and setting the z layer higher than the background layer
Does it mater if I use GameObjects or a Tile Pallete when building a level?
Yellow - Tiles with colliders
Lime Green - Interactable Objects
Blue - non-interactable Objects but they fade when player walks behind them and have colliders. Thinking these need to stay objects because of the script? Or should I put the script on a Tile set somehow?
Red - this will never do anything, doesn't need collider. Currently and object but thinking it's better to change to Tile???
Do objects take up more memory/processing than tiles?
Is there a channel where you can request help from other 2d pixel artist to join a game project?
Nope, you're free to mix and match as needed.
No, there are no collaboration/job postings here. You can use !collab for that.
:loudspeaker: Collaborating and Job Posting
We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• Collaboration & Jobs
Any tips on how big I should draw non pixel art sprites and resizing them to fit my resolution of 1280x720?
Also, what are the recommended sizes for tile sprites?
is there a simple way to draw a tilemap (for UI purposes) relative to screenspace?
Don't scale sprites and use the same Pixel Per Unit on their assets
I'm trying to make normal maps for some rocks textures, but for some reason they're horribly pixelised and compressed. What are some possible solutions?
realied i had compression on and changed it, but its still doing it
managed to get it looking a bit better wby turning off mipmaps but it's still ugly. Are normal maps just too resource intensive? I wanted to make all the levels out of them but im having second thoughts.
Hey, I have a question about using the tile map in isometric mode. Is there a way to make the tile on top render in front of the tile below by using the Z position?
For example, in the image, the tile below is set to a Z position of 1, and I want to place another tile above it with a Z position of 3, but the perspective renders it incorrectly.
when making a sprite sheet, is it more important for the sprites themselves to be multiple of 2 or the spritesheet to be a multiple of 2?
say if for example
I have a bunch of sprites that are cut in the sprite editor into multiples of 2 (32 X 32), and the sprite sheet size is 65 X 65 for total spritesheet size
vs
I have a bunch of sprites cut in the sprite editor into 31 X 31 but the sprite sheet size is 64 X 64
which is more important and will cause the least amount of bleeding pixels/memory usage? The first example or the second example?
neither is that important tbh
it's just kinda a convention, i guess
as long as your various sprites are consistent they should line up just fine
neither of your circumstances would generally happen though, the spritesheet size would just be a multiple of the sprite size
ah, i made spritesheets and sprites divisible by 2 but was wondering if making them all multiples of 2 was more important to unity's upscaling or downscaling/etc
this might be of interest to you https://www.reddit.com/r/gamedev/comments/16oveon/is_there_a_reason_to_keep_my_tileset_and_sprite/?rdt=47588
ah alright, thanks!
So, I have a 256*256 tile sprite, and I want it to take up more than one grid cell. I tried some PPU values but every time they make the tile take up half cells rather than the full cells. Is there any way to fix it?
The block on the left is my tile sprite at 64 ppu, the block on the right is how it should look
Well, I found a fix, but now I got a different problem
When I use the draw button, it overrides the other tiles. Is there a way to fix this or implement a custom brush?
When drawing over a tile on a tilemap, it'll override the one beneath it in that cell as there can only be one tile per cell
Hi 👋
I was wondering, does exist a good 2d tool for composing sprite frames and hitbox/hurtboxes?
not necessarely for a 2d fighting game but also for a top-down game.
For now I'm doing with the standard animator, editihng collision boxes by hand on each animation but it's kind of tedius and probably overkill for a 2d game
You're using point filtering on a giant, resized, NPOT texture, so artifacts are pretty much guaranteed.
How you address it really depends on the look you actually want, but starting off with using power of two textures might go a long way
Is there a way to somehow drag the brush so it won't override tiles?
what is the 2dtools for pixelart please
i use blender but it is not good for 2d pixel art
Can you describe how the behavior you want would function?
I just want it so that the tiles will be drawn fully when dragging the brush
Like how you draw a one cell sized tile
You might want to consider making a Rule Tile so you can just use it as a 1x1 and have it automatically select the right tiles for the center/edges of your shape if that's what you're going for
I always recommend Aseprite
How do I fix my tile map?
I can still drag and drop the tiles into the scene but Have no way of telling which tiles are which
did you set the pixels per unit correctly? and have you sliced them correctly?
I figured it out
cant have 8 pixel ones mixed in with 16 pixel ones
Thanks
Is it possible to dynamically generate tilemap rule set tiles? I'm having a rough time figuring out how to implement rounded edges on a dynamically generated grid like most grid based games do.
My first thought was that purple game board background is just a full square sprite that covers that entire screen(visible inside mask) and the playable cells are masked while the non-playable cells have no mask. One of the parts throwing me off on this picture are the double inside corners at the bottom. Anyone have any ideas on how they would achieve what this picture is doing?
I have a problem when it comes to automatic sorting on a tilemap:
I am making a 2D role-playing game, and right now I want to figure out how to properly do automatic sorting with tiles and sprites, so that, for example, if the player walks in front of another sprite/tile, it would be drawn in front, and when he would walk behind it - the order of the texture presented would be inversed.
Initially, I approached this by going into the Project Settings -> Graphics and changed the Transparency Sort Mode to "Custom Axis" with values: X = 0; Y = 1; Z = 0. I also have checked that the Trees and the player are on the same Sorting Layer, and that all of the sprites/tiles in-game would have the same Z value of 0, and that all of their pivot points would be set at the bottom of their textures, prior to the testing.
Unfortunately, the automatic sorting tool doesn't want to display properly, and as of now - I could not find a proper explanation/fix on how to combat this. If anyone has any ideas on how to mitigate this, I would be immensely grateful for the helping hand)
Here is a video example to highlight the problem and to give you all a better insight on what I'm trying to fix:
Is the tree a tile, or multiple tiles?
Where's its pivot
What's the tilemap sorting mode
The tree is multiple tiles, technically;
The pivot point lies on the center of it's trunk (X = 0.5, Y = 0.2);
The trees have a separate tilemap, since they are the only type of sprite who have collisions, and that tilemap's sorting mode is Chunk.
Here is picture of how the tree/foliage sprites have been cut up in a sprite editor, and where the pivot point is on trees:
I think the main issue is chunk sorting mode, since it groups tiles up for combined sorting which may not be accurate with custom axis
Still, I'd probably prefer to make the trees gameobjects (or gameobject tiles) whether you keep the tilemap as chunk sorting or switch to individual
There isn't much of a benefit to keeping the trees as tiles since they don't have any tile-like characteristics
And also because the shadow and maybe the trunk and leaves as well might need different sorting depths
Okay, so after applying the Individual option for the tilemap's sort mode, it now finally gives me the effect that I want - I thank you very much for the help!
As for switching them to separate game objects or keeping them on a tilemap, for now I'm gonna use them as tiles 'cause, as my current familiarity with the system, for me - it is faster and easier to add them as tiles on a tilemap, rather than creating a separate game object/prefab for each individual sprite. Although you mentioned something about game object tiles...
Now, forgive me if this question has been repeated over and over again, but what are game object tiles exactly? Are these just game objects that just snap to the grid, or...?
Tile assets have a field for a gameobject to associate with that tile
what should i do to make tile collide?
Hey all, I'm trying to add an event in the userdata field of an animation in Aseprite, but it's not show up in the Unity editor. Is there anything I'm doing wrong?
How can I make a rule tile for an empty frame of tiles (a hollow box, with the frame being made out of tiles)
I have script that should teleport player seamlessly to different location with same looking room but different outside but
for some reason some shadows don't load instantly? Anyone knows a fix for this?
Im having an issue when trying to overlap 2 2D sprites with a non max alpha. The overlapped section is a combination of the two sprites, how can I fix this?
holy crap using tilemaps is ridiculously dumb or just i am
why is it even possible to have a microscopic tile that doesn't match the grid's cell size? why cant i specify an exact dimension for the grid? why does the sprite's actual texture resolution affect how big it appears?
all i actually want is to have an n x m grid positioned across the camera viewport (not even rendering anything) and then have code able to use that object to resolve x,y coordinates to a scene position
i guess ill just make like ... an empty object with a rect transform, and simply divide that myself
anyone knows why the sprite outline is fucked? its happening to all my sprites, and i already reset the editor
How can I change my rule tile so that the bottom corners tiles (circled to the right) will also be present in the corners circled to the left, as well as them appearing regularly on the block to the left
For inner corners you want to do something like on the left, but bearing in mind that for a 1-tile thick wall you also need to account for the situation on the right, etc etc. In this example I've set it to mirror the tile on the X and Y axis (by clicking the little thing in the middle of the rule) so it works for all 4 corners
also your existing corner tile visually wouldn't work as you'd want it inverted compared to an outer corner
Am I doing something wrong that my tiles arent filling the tile palette? Tired of squinting
What are your pixels per unit?
sec let me look
I guess it was 100 per unit.
That will be annoying if I try to fix it now
(map)
What are the size of your sprites?
16x16, 32x32? That's what you want to set your pixels per unit to on your sprites (e.g 16, 32, etc)
16x16
thanks bit
yea I had set them to .16 because I was like wtf size is weird
now I know why
In case you haven't changed the other settings, make sure pixel art sprites have these settings
Yea they do
How do I make 2 rule tiles connect with each other? I have a rule tile for walls and floors and a rule tile for slopes, and the rule tile for slopes doesn't work in conjunction with the rule tile for walls and floors
The top platform is how it should look, the bottom is how it looks currently
is there any naming convention for sprite secondary textures so sprite importer can automatically pick up masks and normals?
like idk MySprite.png and then MySprite-Mask.png and MySprite-NormalMap.png and then MySprite just use secondary textures on import
I simply added the slope to my already existing rule tile, but now I got another problem: How can I apply a slope made out of 2 tiles to this rule tile?
I don't believe so, but you could always add your own asset processor script
Currently, I have a rule tile that can draw single tiled slopes. But, I also want to add this 2 tiled slope to this rule tile. How do I do it?
I figured something out
bones wont appear pls fix
2D animation and skeletal animations. Does Unity allow us to have real-time 2D skeletal animations or does it still export still images and during gameplay we're still locked to whatever FPS we exported our animations in?
It doesn't export anything, rather it moves transforms around and can swap sprites
That's why 2D IK works
Im trying to use trails, but the trails are behind the background. I changed the sorting layer for both the background sprite and the trail, but its still behind...
are the trails on the same z-index as the background?
everything should be set to just 0
don't settle on "should", go check
have you tried swapping the sorting layers, in case you did it reversed
its not cause then the background would cover the rest of the game
the sprites are in the correct layers, its just specifically the trails
i solved the problem, having all trail related items have a z of -1 fixed it for some reason
right that'd just move it closer to the camera instead of dealing with the sorting order
how can i configure my ruletile so that it places a wall with black space to the right of it when it's on the left side of a structure and place a wall with black space on the left when it's on the right side of a structure?
(basically how do i get the tiles to be the sprites im pointing to)
If you plan to fill the walls, you can add a cell to the side that will be filled(that is, the middle)
The tilemap extras rule tile cannot differentiate by "outside" or "inside" unless either outside or inside is filled with solid tiles
That is a better way of putting it, yeah.
I think the Rule Tile is meant as an example of what's possible with custom scriptable tiles, moreso than a feature complete tool
I'm having an issue with the water spriteshape constantly flashing every couple of frames when animated (splines are controlled with shape objects). I see it's an issue with the fill tessellation, but none of my points are close nor overlaps each other.
I have tried disabling the C# job, but that removes the fill material.
Also tried lowering the detail quality which works better, but still flashes.
Any suggestions that I should try?
hi chat, quick question about the sprite shape tool. This is probably is a long shot but does anyone know if there's ever been any extensions created for more advanced functionalities? Like for example, the ability to sew two sprite shapes together or slice one sprite shape into two
Is there a way to make rule tiles also account for tiles that aren't in the rule tile? Like instead of going around those two other tiles it would just connect like normal.. Hard to put into words which is probably why google hasn't been that helpful
The usual way would be to add the decorations in a new layer above them, but you could also extend theveule tile; it really is pretty bare bones.
adding custom button textures to my game off of stuff i made in aseprite. i'm having some weird sizing issues trying to get things to align though. i'm using unity's pixel perfect camera with the resolution set to 640x360. i've done a UI mockup in aseprite and then exported the individual elements to be overlaid on it, but when i bring them into the canvas and set the button textures they don't really line up
my canvas is set to the same resolution as my camera, and the bg image i'm using to align stuff is the same resolution. so why is the button's sprite way larger than its sprite when shown in the reference image?
oh hang on - is it literally just to do with my width/height?
how can i make my rule tile look like the tiles above? (bottom one is my rule tile, top one is manually placed ideal tiles)
Was there clarification you needed on the answers to this exact same question you got yesterday?
Oh sorry, I thought I already replied to those answers my bad! My reply was talking about if there was way to do this without having a middle tile in the center as I tried doing that but then it required my tiles to be an extra tile thick because if they weren't, my corner tiles would break
The real issue is that in that case there is too much ambiguity as to which side is the 'inside.'
I mean, if you had all black tiles in that shape and asked a HUMAN to assign your tileset to it, what rules would you give them?
I experience EXTREME tile tearing on Unity 6000.0.28f1, despite trying all so-far-known-by-me solutions, including:
- getting tile sprites into a sprite atlas
- decreasing tile gap to -0.01(altough, I would much prefer to leave that at 0)
- adding pixelperfect camera component to my cinemachine (it does not allow for any settings in the 3.1 version)
- ensuring the tiles are properly sliced
- ensuring camera renders in ortho mode
- ensuring both tile sprites and the sprite atlases are set to point (no filter) filtering mode
this happens both in scene and game views (its consistent across those at least), and drives me nuts. It also is not consistent for all tiles, and even across the same ones the tear can randomly start and stop
Is there anything I havent tried and I should?
my only theory is that, beacause of the tilesheet having no gaps in the original png between tiles they are somehow cut/taken to render incorrectly? But what is even more crazy, is that decreasing the PPU value from the default 128 to even 120 ensures they overlap, but still shows tearing?!
i mean this just makes me wanna puke.. wtf
another clue to cutting is these window tiles for example, where they crealrly bleed through eachother, despite being perfectly cut in the sprite editor
...they are in fact... not... first time a kenney asset has failed me and is not actually perfect 128x128 tiles, but each of them is ever so slightly off
@gritty heath Just a quick check, what are your import settings on the image?
its like this, and also... i found an identical spritesheet with 10px of padding between tiles... replaced that, painted, and the issue is still there (tearing, overflow disappeared)
and i have identical settings in both, extruding edges changed nothing, setting any settings combo in the sprite atlas also did not help, it actually didnt change anything, so im even more confused
the only solution for now i found is unfortunately... TAA
its not too bad, just disappointing that displaying pixels on a grid is such an issue lol
when you look close enough, TAA is not able to fully fix the issue, and it also has issues on its own... if anyone has a potential fix i would appreciate it, its for a school diploma so kinda important 💀
fix for the freaking tiles tearing, on a dedicated 2d project... not TAA, its a band-aid to a bleeding injury
i found the solution! it was a combination of previously ineffective sprite atlas and new tiles with a pre-defined 10px padding, no TAA required! after putting all tile sprites into an atlas, fiddling with its settings i am able to render tiles properly!
i'm having a little trouble with the tile palette
i am trying to place the tiles however it places over the rest of the game. idk if its to do with the hierachy or not
@median gate Did you go into colliders in tilemap and check the actual physics shape?
If anyone can help, im having some issues with borders and 2D colliders with my walls and such and i'm not sure what's gone wrong. Basically my walls arent acting like walls and my character just goes right through them. If you see the issue, please put into easy words as this is my learning game and i've never really done anything like this before 🙏
Make sure in your Tilemap Collider 2D Used by composite is enabled
Would that be used by effector? because i cant seem to find the Used by Composite in there, and when i select Used by Effector it doesnt seem to work either
This one and a half video teaches you the basics on how to set up tilemap collisions for your game in unity. If you stick long enough, I have also added a bonus hack to get smooth and optimized colliders
ASSETS
Pixel Adventure 1:
https://assetstore.unity.com/packages/2d/charact...
which is better (its my first day making pixel art)
See I even removed those componets and re added them and "Used by composite" does not pop up for me, it ends after Used by Effector
What version of unity are you running and it should be in Composite Operations in Tilemap 2d
I would like to add something and I don't have idea :)
Okay, i see that my issue was both, i didnt have it on intersect and for some reason my Layers was blank instead of on the solid objects layer, now i need to figure out why its colliding so soon instead of at the border of the object 😅
Got another question, does anyone know why this black line would be popping up? It appears sometimes in the scene and when playing the game and its sporadic. I thought maybe it was from the tile assets i'm using but even layering, or using different assets and it still pops up.
How to save Sprite Editor?
I have the start on the Sprite Editor tab
When I press Ctrl+S and when I choose File - Save nothing happens
When I middle click on it, it asks me if I want to save and I can do that I guess, but is there a way to save it while working in it?
also consider File > Save Project
"Save" just saves the open scene
(i think it also...sometimes saves other assets?)
how can I change the grid size in the scene?
Open the grid menu. It's the one that's colored blue here
er, whoops, that's not it
Switch from "Local" to "Global" so that the grid snapping button becomes usable
Then edit the grid size in that menu
hey all,
I've been having issues with Unity's Transparency Sort Mode custom sort via y axis. I've tried using both Built in and URP. Neither do the job the transparency sort mode claims to.
doing everything right so far as I can tell:
pivot sort axis
same layer & sorting layer
same order in layer
if anything it gets weirder bc the player was sorting with a background layer that wasnt anywhere CLOSE to being on the same layer. and it wasnt even happening on the y axis, it was on the x axis. this is resolved now by changing the material or something to default sprite or something haha but yeah, would love to have this sort function work visually
will also post in #archived-urp bc that actually seems more relevant
Can anyone tell me why I can't use my tile palette, I'm new to unity and I've watched 5 tutorials at this point. I've gone through the steps of
creating the tilemap
creating a palette
getting an asset and putting it into the palette
selecting the tool and drawing
Can't honestly tell what im doing wrong but the brush has yet to work and this is getting annoying at this point
hm, that should work...can you try focusing on the tilemap with this dropdown?
What's the default way to make sprites appear in front of other sprites based on their Y position?
This depends on the sorting axis. What render pipeline are you using?
I have a 2D URP project. I configured it like this, so that items are sorted on both the Y and Z axes
What render pipeline are you using?
URP
Thanks, I found this Renderer 2D asset in the Settings folder.
Where in the project settings is it used?
The Renderer is referenced by the render pipeline asset
Which, in turn, is referenced by your Quality levels and by the "Default pipeline asset" setting in Graphics
You can assign different render pipeline assets to different quality levels
I see, thanks, it works.
Hi dear artists, so i'm no artist at all but i'm using 2D sprites for decals on the ground for vermins and blood stains. If i want to make some "topography", i mean simulate some height (with light or not), what can i do easily and for free if possible ?
I saw that i can add some second texture in sprite editor, currently using a URP/Lit shader to get shadows/lights on my sprites
hello, i made a sprite with 1128x1700, imported it to unity and it looks super blurry, i tried changing the PPU but still looks blurry asf. i also always set to native size, but still blurry, could anyone help me here?
Check compression quality on the asset. https://docs.unity3d.com/Manual/class-TextureImporter.html
@lean estuaryi got it to none
the images are bigger so i can scale them down without worries
but even with normal native size its blurry asf
Filter mode as well
Point (no filter)
Then your object is scaled on the screen
yea i changed the PPU from 100 to 250 so i could scale it down
but even with PPU set at 100 the image looks blurry which is weird
might be mip map setting influencing as well
let me check on that
mip map is disabled
should i enable it?
mip map generates lower quality copy to use when further from camera
ah i see, i also tried activating anti aliasing but then noticed its for textures and not sprites
thought it'd work but did nothing
even setting the anti aliasing to x8
i honestly have no idea what to do at this point
Do a sanity check, create new scene and just drop the image in the root and examine it
ill try that
It should be displayed without scaling, then compare and find where the problem in your scene
alright created new scene and its finally working
had to add mip maps
thanks for the help mate
you tell us
Anyway for me to mark a specific part of the tilemap to then copy + paste it around/move it
If you are not using tilemap features for that, prefab it as a container of regular sprites then move it.
There are a variety of decal shaders, the one for urp supports normals
Can you be more specific? 
I figured it out
My text looks like this after switching to tmp
Does any1 know what this is (I tried changing the font, didnt work)
Your atlas has too low padding and dialation/sofness starts to bleed in from each neighbouring letter
Create new atlas with higher resolution and/or padding
New vector editing software called friction2d. Fork from enve. Open source
out of curiosity, can you add a skybox in Unity if you are using the 2D preset?
That feature is disabled in the URP 2D renderer, so if you're using that one you'd have to re-implement it
im not sure how to go about doing that
Me neither really, if you want the exact same sky
It's somewhere in the URP source code
You could instead render a plane or an image behind your world with a custom sky shader on it, if you don't need the real deal
I want is to import a world map split into regions, and when I hover a region it should be highlighted (either with a shader or separate sprite, doesn't matter).
Trying to figure out how I would do this effectively from Affinity/Photoshop -> Unity. My initial idea was to have the region lines drawn on a separate layer, and then use some sort of magic to divide that layer into multiple images where any edges meet, export them and then import these sprites into Unity and generate 2D polygon colliders, matching the shape of each region.
However... When I place the world map sprite in a scene, and want to add the regions on top of it, wouldn't I have to add each region one at a time, and align them manually to where they should be? Is there a better workflow for what I'm trying to do? 😅
Hello! i just want to ask why is the ship sprite jitter so much while moving? at first I thought it was my monitor but when I tried to record it in the game, it actually is jittering so bad, does this have to do something with how I coded the movement? thanks!
Maybe it is related to how you coded your movement
Are you altering the gameobject transform directly?
i am actually using rigidbody for its movement
i've fixed it! after scouring through the internet, I have found out that I was doing the mouse movement wrong, particularly its position to which the sprite was looking at, the problem was that since I was using rigidbody, any position or rotational modifications should be done through physics, except I was handling the mouse look position of the ship through the transform component, which causes the jitter, now I refactored it so that the rotation is done inside fixedupdate to work with the rigidbody movement.
thank you @pastel bay !
For the layers alignment, you could use the psb importer to import a layered image as a prefab, all lined up.
Another option would be to use a secondary texture which had the regions as different colors, and fred that into a shader.
@pastel totem it looks like your tiles are all centered weirdly -- did they come from a single large spritesheet? if so, show a screenshot of the Sprite Editor window
That looks fine. What about these tiles?
yep. The pivot point is in the bottom left corner
The pivot mode is on "Custom" right now
you should be able to set the pivot mode of every sprite all at once
is there a way to make them all center all at once?
I do very little 2D so let me check that..
Okay, so you'll need to re-slice the sheet.
Use the "Smart" method.
actually, somewhat remarkably, even the "Delete Existing" method didn't lose any references
you saved me once again
My concern here is that re-slicing could wind up screwing up all of your existing tiles (by destroying the Sprite assets they refer to)
thank you so much
you're welcome :p
I'm actually not entirely sure how the GUIDs for the sprites are calculated
how do i fix that if ur still online
I explain it in the next message after that. This is Asset Creator https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.2/manual/FontAssetsCreator.html
now my text looks like this
Did you use Text Asset creator instead of TextMesh Pro asset creator?
Hey everyone not sure quite how to ask this question but in my game I have a ball bouncing on a series of floors. I drew a floor myself and imported it but there seems to be a disconnect between the drawing and and the actual thing the ball is bouncing on. For example, the ball will bounce before we see it touch the floor. Is this because there is a difference in the size I drew and the transform? Is there some step I am supposed to take between importing an image dragging into the inspector sprite
box 'Sprite' ?
but that makes it so i cant use tmp i think
You need to use TMP asset creator if you are using TMP components. And compatible font to create it as well.
You should illustrate your question with pictures or video.
i got it to work now
thanks
i just had to reupload the font
Sure, basically the ball is 'resting' on the floor in this pictureI would like for it to be more true to the image I drew.
When you selecting items you need to examine their colliders. How far their actual colliders are from each other.
oh yes you right I am so silly thank you very much
Colliders also have contact offset setting in 2D physics, determining how close they can get. But that won't have large impact unless you scale down things by a lot.
Appreciate it!
Hey I am wondering if anyway know how I can properly align my tileset (first image) to match the second image.
Hey!!
I just created a tile pallete and tilemap.
Tho I have a slight issue, the tiles dont really look like theyre alligned in the tile pallete, does anyone know how to fix it?
I know the tiles are 64x64 pixels, each sprite has "pixels per unit" set to 64 like it should be...
In the palette settings I changed the "cell sizing" option to manual, which helped it a bit, but they're still not aligned
They will use pivot settings from their atlas asset, examine if they setup properly there.
I think I just figured it out.... 😅
the gridsize was set to 0.5, I just changed it to 1
With a PPU of 64 and 64x64 sprites, a grid size of exactly 1x1 is the right choice
Thanks !!
I just imported my character, the problem is, I have a slight black outline, which is kind of annoying. Does anyone know how to fix this?
Do you have "Alpha Is Transparency" enabled?
this would be on the texture importer
Is this screenshot from the scene view?
If you aren't using a pixel-perfect camera (which you definitely aren't in the scene view), you might get some sampling artifacts
yeah its scene view, but it looks the same in the game view
how do I change that?
What render pipeline are you using? If you don't know, what template did you create the project with?
Universal RP
Okay, so check this out -
a pixel perfect camera has a size such that a single sprite pixel takes up a square pixel block on your screen
It also aligns the renderers to this grid
it didnt seem to resolve my issue
I know what the problem is...I think, I have a Shadow Caster2D on my player character, so that it casts a shadow under a point light. When I change the point light to an global light, it seems to be fixed, how can I keep my point light and also remove the outline?...
Ah, is it casting a shadow onto itself, perhaps...?
I have done very little with 2D shadows
No, there is a selection box, it does not cast a shadow on itself
The 2d shadow caster works by creating a full screen shadow texture, so my guess is that you'd need to make the pixels of that line up with your pixel perfect grid too?
Neat.
Good thought.
The shadow itself doesn't fit the grid
I have these weird issues with my pixel art, it is very inconsistent. anyone have an idea why this could be? thanks
(I use Filter Mode: Point (No Filter), Compression: None, and PPU: Width of sprite, tried ortographic camera and perspective camera)
Added you using the pixel perfect camera package? And have you followed its recommendations for setting up PPU to match it?
Alternatively, use a higher resolution camera and perhaps a shader like smoothpixel.
smoothpixel?
You don't actually need the asset to use the technique but that makes it super simple
Basically the idea is to antialias the low res texture by supersampling, instead of by interpolating.
Thank you, it works fine now! I used a perspective camera because of the hovering effect i wanted to make, but this distorts the pixels.
With ortographic camera it works perfectly fine, but i'm having another issue regarding rotating 2D sprites around X and Y axis with an ortographic camera. What i'm trying to achieve is a "weighted tiled" on card sprites. When i hover over the card, it should ac like a weight that tilts the card, like in balatro or hearthstone for example.
I implemented the rotation, and looking at the 3D scene view, it would work perfectly fine.
The problem is, i think, because of the ortographic camera (because with perspective camera it works). Hovering over the top half of the card, the rotation appears correct in the game view. But hovering over the bottom half of the card only appears correct in the 3d scene view, in the 2d game view it weirdly mirrors the rotation.
Does anyone know how to solve this?
Thank you.
Like, when hovering from top to bottom, the same rotation is applied, it tilts upwards no matter if im hovering over the bottom or over the top. same problem for left/right
@near stirrup if you want perspective, you need to either use a perspective camera or fake it.
Orthographic cameras treat everything as the same distance from the camera so tilting in 3d space doesn't do much.
you'd have to make the top and bottom sqeeze inequally
without perspective you'd have to keystone it, maybe with a projective transform, but idk if unity has that built-in
Cross posting my original ask here:
I'm getting sprite popping/swapping when my camera moves or zooms out, and i'm 99% sure it's coming from some internal issue where a material with multiple instances and sprites are deciding to coalesce to the same sprite image regardless of assignment. Is this a thing? If so what's the best practice for material assignments versus unique sprite needs?
The material in question is just Sprite-Lit-Default, but i remember running into this in the past with a custom material which i solved by making a unique material per texture (which felt super counter-intuitive, but did solve the problem). Thanks in advance!
now with video
i have two sprites i'm placing, and both when i place one of them it'll flip all or some of the other instances, and when i walk it'll swap between them. The references in the spriterenderer themselves are not changing, its all just a graphics glich as far as i can tell
Are you changing material or texture properties via scripting for those sprite renderers?
they are all just prefab variants, they do not change once placed
its possible that im populating the base sprite image using a SO, let me check
nope its in the prefab
@past turret is this urp or built in renderer? Have you looked into sprite batching?
unity 6 URP
I can't view the video on my phone so hard to tell exactly what is going on
if i had to guess, when the camera detects a specific instance of the material, it overrides/assumes the rest of the instances share the same sprite
it changes on camera zoom or position, but at certain thresholds
it also can change if part of a prefab is animating (some other ocmponent than the sprite) its like its treating every instance as the same render for whatever reason
if my camera is zoomed all the way out, it does not flicker like this
i can probably do a really clean video for a phone, one sec
so of note, the ones at the start of the video are all brown, and should be
and then i walk up to a white one, which changes them all to white, which feels like a frustum thing
and if i zoom out a little, including it, they all change to white
if i zoom all the way out they are correct
nothing about the scene is changing except the camera
i'm 90% sure i can solve this by splitting up the material, that just seems not-intended though
Are the sprites atlased?
Triple sure you're not changing material or shader properties like _MainTex from a script anywhere, only assigning Sprite references?
100%, look at the video, its completely camera related
the sprite field reference also does not change
they are not atlassed
An atlas might help, though hard to say when this shouldn't be happening to begin with
I'd try to look into what's common with those two specific sprites, since only they seem to be swapping
it was happening with my trees earlier too, i solved it with unique materials
the only common factor is they are prefab variants
(i havent tried splitting them into their own prefabs because that would be a huge amount of maintenance, but its an option)
The only explanation that makes sense to me is that a script would be changing the texture reference, which the Sprite Renderer is supposed to be responsible for via the Sprite field
Doubly so since the issue seems to be per-material
Or it could be some quirk of sprite batching
i think its more that
i feel like its trying to optimize and overriding the texture reference
which is why unique materials fix it
mind its not a unique material per object, just per texture that solved this in the past
im also using stenciling, which might be introducing weirdness. it's not being used in this video but it might be causing interference
You could test without stenciling, could do a test without prefab variants, could do a test without sprite batching
yea i think i can brute force a solve, i'm mostly here because its the second time i've run into it and was wondering if this is just a Unity thing that has a known workaround
at first blush it looks like z-fighting (but its definitely not)
Not a known one to me, at least, since I've never seen this before
That's why I'd do some process of elimination first to see if any of those could be causing it
Additionally trying to repro in a blank project as well
just as a followup for future knowledge, none of those 3 solved my problem. Duplicating the material once and applying it to the other version did (so a unique material per texture). Which still makes me think there's some oddness with batching behavior, but i have no idea in reality - it's just what the symptoms would point to.
thanks for your time trying to help solve it
hello im working on a 2d game using cinemachine and a camera with the projection set to perspective. im using it to create a feel of depth but i noticed that some sprites in the "back" (so on a lower Z level) stop rendering if i get far while still being in the camera view. does anyone knows how to fix this problem? i already tried to modify the clipping planes
If your camera's lens type is orthographic, Z position has no effect on the parallax appearance of the sprites
Sprites behind the camera and beyond the far clipping plane will disappear in any case, so modify the far clipping plane as needed and add some Z offset on the cinemachine cameras so the camera does not move in so the sprites would end up behind it
Even when working in 2D it's best to sometimes disable the Scene window's 2D mode and see where everything is located relative to each other in true 3D space
im sorry im not really understanding, these are my camera settings, i tried to modify the clipping planes and nothing changes
how do i properly adjust my custom physics shape for my tiles? everytime i try to adjust the points it either ends up creating new ones or re-selecting it
That functionality was bugged in particular editor versions, which one are you using now?
2022.3.4f1
That's pretty ancient by now
Update to 2022.3.55f1
Look at your scene in 3D view, meaning scene window's 2D mode disabled
See where your sprites are relative to your camera in Play mode
no wait i resolved
If they're disappearing they're likely going out the frustum in some direction
But if not, that would confirm it too
instead of putting every images as single sprites i just create a big one with all the elements so it never gets out og the frustum, its probably not the best way but it works too ahah
It hasn't gone anywhere, but looks like some of your scene window buttons are hidden
You can control their visibility from the three dots button on the top right corner of that window or by right clicking Scene tab and choosing "overlay menu" for "tool settings"
But if it still doesn't appear you can reset the editor layout
i found it
thx
any1 know what this is
if you get an error like that from a UnityEditor-namespaced class, it's probably not your fault
is there anyway to have this tilemap i have selected here just stay highlighted like this even when i click away?
can anyone help me with a tilemap setting?
i want that the tile use only one slot instead of four or more
Pls help. I tried everything on the internet but nothing works T_T
Here are my current settings. The water tile is overlapping the dirt tile when the dirt tile is supposed to be above the water tile because I set the Z position to 1 and the water tile's Z position to 0 when painting
Disregard this. Already solved the issue hehe
how do i make the tileset to be pixela ccurate
bro is remaking palworld ? xd
im remaking a 2d sandbox game
not palworld
i meant
its a game like growtopia
masterpiece
nah growtopia is now shit
piel worrld was trash always\
no offense
atleast me, i hated the navigation/economy on pixel worrld
bro pixel world has been there for 8yrs? u kidding me
got release in 2017
pixel worlds was perfect in all things
but staffs leaved and dupes came
anyways u got a clue how to fix it xd?
idk not working
idk if the issue is how i drew it on aseprite or i am doing soemthing wrong
show
idk how to show tbh
Change pixel per unit in sprite settings
how to make hole like this use sprite rendere?
Would sprite masks do what you want?
can you be more specific?
Each plank has several holes as needed, and I can't make it fit like that
and if you make assets per plank, it will require a lot of assets, maybe more than 1000
because total level more than 100, and each level exist 3 unique stage
you can try this game on this site https://wmelongames.itch.io/screw-puzzle
yes i can buy this template, but i dont have money🥺
You may have many levels but do you actually need so many different textures? Can't you reuse them for every piece type?
yes i can but hole has different location
But do you really have thousands of hole locations?
yes
If neither making the holes on the textures (by hand or with custom editor script) nor using masks is an option, the only thing that I have left in my mind is using a shader and passing the hole positions as array/texture/buffer/whatever
oke thankyou, i can try this
Just make the pieces modular.
Stick holes wherever and stretch solid bits between them.
Since the holes won't ever overlap
I found a really easy to use website that can turn png files into ttf files. (Also know as font files) Anyone want the link?
Why do we have fonts as png though? Usually fonts are ttf already
why cant i see my 2d cirkle collider in scene
Do you see any other colliders in the scene? Have you made sure the collider has reasonable values (like positive radius)
why does this happen and how do i fix it
It looks like your trees are made of multiple tiles and/or your tilemap sorting is in chunk mode
Chunking arbitrarily groups up tiles for efficiency, I think
how do i prevent that?
Could try invdividual sort mode in this case
Assuming your trees are just one tile
i got it from an asset and in sprite editor it says Tree 3 lower
how do i fix this they keep going behind each other and it keeps happening
Tilemap renderer has sorting layers. Use them to sort ground on lower proirity.
how about for the tile gap
What do you mean? You need to explain or illustrate your question.
How can I fix the gap between my tree tiles? I downloaded them from an online asset pack, and they are separated into two parts. However, when I place them in the scene, there’s a noticeable gap between them. I tried adjusting the sprite editor settings, but it didn’t resolve the issue.
Set custom pivot for irregular sprites
You really should be following Unity !learn course or tutorial for this
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
where is that at specifically
it didnt work its still the same small gap
Did you apply changes?
Pivot changes propagate instantly if you actually using it in the rule tile asset.
I guess it's better to say that this website is good at making ttf files.
oh, you mean from a handrawn scetches?
I think it'll be more helpful if I just show you an image
feel free
This is the PNG file i turned into the TTF witht he website
I only have 8 points, yet I'm getting the following error:
Mesh data has reached Limits. Please try dividing shape into smaller blocks.
UnityEngine.U2D.SpriteShapeController:LateUpdate () (at ./Packages/com.unity.2d.spriteshape/Runtime/SpriteShapeController.cs:615)
Does anyone else get this? It was supposedly fixed in my editor and package version (Unity 6000.0.32f1 - 2D SpriteShape 10.0.7)
idk if this is the right channel for this but Ive been using Piskel to make water tiles and will each tile be placed seperately when i use it in tilemaker
Can you prefab that object and share it in here?
Hi all, are there any free tools people know about to turn an image with a bunch of sprites into individual rectangles based on where the transparent pixel gaps are? Basically I want to automatically cut the sprites around these trees made in procreate.
why are my tiles going underneath? the background is an image in canvas and tried to use the sorting layer in canvas and sprite renderer but its not working
this also applies for the sprites ive made too
There's a sorting layer and order within that layer. When all of those are the same then it is sorted by distance from camera. Turn off 2d Scene view and look at composition in 3d, might help you visualizing what's happening.
Also camera has clipping cut-off, don't put things too close to it.
It is prudent to go through tilemap/2d tutorials you can find on Unity !Learn or at the very least the Manual explaining 2d workflow. It will save you a lot of time just stumbling around.
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
The unity sprite editor does that if you choose auto.
Ok so my spriteshapes are being messed up. I instantiate the shapes, then move the points all around. If the points are too far apart, it's invisible an incollidable until I get close enough to it, or zoom out sometimes.
(Ping-reply please)
I think it's because it's getting culled, but for some reason it's acting like it should be culled like the original shape it was
dunno how to fix that
https://discussions.unity.com/t/spriteshape-modifying-the-shape-at-runtime-the-sprite-does-not-show/722319/37 never mind I fixed it using this article
https://forum.unity.com/threads/spriteshape-modifying-the-shape-at-runtime-the-sprite-does-not-show.586453/#post-7270162 this url has been archived by the wayback machine
Is there any tool like spine but for pixel animation or something that makes pixel animation a lot easier. Because now i m creating a frame by frame animation where I mostly have to redraw it every time in aseprite. Is there an alternative for pixel art?
Has anyone tried making a massive open world in 2D (top down)? Is it doable (performance wise)? Can DOTS be used?
Doable if you know how, of course
DOTS can be used for anything you want
Hi does anyone know how to fix my character teleporting during the attack animation(i know why it is but have no idea how to fix it) basically when it attacks the sprite suddently becomes bigger so the character goes back a bit
Just letting people know here. Unity 6.1 has a nice upgrade for 2D tools.
New Tile Map tool system with built in auto rule tiles that include ruling presets that can be saved and set on multiple sheets at once allowing you to not have to redo rules for auto/rule tiles.
Edit: For anyone wanting to play with the tools. Unity has them currently in the Tile Map Extra package 4.2 release.
In the asset creation menu there is a Auto Tile option at the bottom and inside the Tile Palette section a new Tile Set option.
Set the pivot for each sprite to the correct position?
Don't crosspost and change your question if it's solved so we don't spend time on it pointlessly please
Any art nerds seen this? After slicing with isometric grid these random black lines have occured offsetting the image slightly.
in sprite editor all looks good though
That I don't know but I wonder what's the point of slicing it like that
The lines of your image don't line up with your isometric grid
I find it interesting slicing "isometric grid" gives a more rectangular base. Might need to pop some offset. Drawn snapped to isometric grid in procreate and X/Y were 70/35 as shown in the bottom so not lining up is interesting... However not lining up doesn't seem like it'd create those random black lines..

Slicing it like that for performance and collision despite being drawn in isometric view
fixed it
Hi, Unity used to have Create > 2D > Tiles > Tile, but in recent versions, it all refers to Tile Palettes. As far as i understand, those are usefull when hand-painting 2D terrains, but i want to create procedural terrains from code, and want to refer to Tiles and Tilemaps (as assets) directly, without using the palettes. How to create the Tile (without using palette), when having the sliced png?
EDIT incase anyone faces this problem too: in the end i used the "Tile palette" to create the tile files like seen in this video (https://www.youtube.com/watch?v=1E0w-YKQnd8), bit weird the new workflow but ok, i was able to move on.
hi, the tile's uneven borders are messing with my collision and i can't really find an easy fix for this. i tried with the sprite editor's custom physics shape, no luck. i tried messing with the collider composition settings, no luck. the current bandaid fix i'm sticking with is upping the composite collider's vertex and offset distances, but it's sort of messy as it creates slopes where there shouldn't be any. any better solutions for this?
Hello! Folks that use Aseprite, what's your workflow to export from Aseprite to Unity and use the animations of the sprite? It give me errors when I try to make an animation tree or even modify the file
This is the error I get
Failed to load 'F:/videogameProjects/UnityProject/Assets/Sprites/characters/slimes.aseprite'. File may be corrupted or was serialized with a newer version of Unity.
UnityEditor.GenericMenu:CatchMenu (object,string[],int)
👋 big unity noob looking for guidance. I'm working on making a mobile (ios) tile game. I have a canvas set up and a camera with the pixel perfect component. my tile sprites are 16x16. I'm having trouble figuring out how to make the tilemap grid larger to where the width of my screen is (say) 8 squares wide. right now it's probably 60+ wide, and it's making everything super small and losing all details, all of my sprites have to have a scale of like 5x to be visible. when I set the grid cell size to be something larger than 1x1 (I tried 8x8), the cells are the right size, but the tiles inside them don't fill to the entire size of the cell. I've tried fiddling with PPU and all of that to no avail.
there's definitely a chance I have my canvas/camera/etc set up incorrectly which is making this more difficult
You need to set the camera's target resolution, yeah.
I'm getting jittering on my ui things when updating pixel perfect camera's PPU on fixedupdate
oh wait I fixed it by manually rendering after running my code
still getting these weird size jitters though
Is there a reason you keep UI on the camera?
If you put it in screen space it won't get affected
I'd like it to be pixel perfect with the camera
oh wait
you can do that with overlay
It looks to be happening on odd numbered asset pixels per unit values, which wouldn't make sense for power of two art assets
how do i disable this icon in the middle of the right grass thing im placeing?
cus its snapping to the other one and i dont want that
just wanna free place it
What icon do you mean
And what does "free placing" mean in this context
like i cant connect them fully, its like its snapping
the white circle ish icon in the middle of the right grass block i mean
same for placing this grass, the first layer of grass is lining up, the second one looks like it is above the first one, but it has to be the same level, is there a way to do this? (sorry im new with design and editor stuff) 🙂
It's showing the grid cell you're painting on and the shape is a hexagon, indicating that you're painting on a hexagonal grid
But your tiles are some square, some isometric diamonds, and way too big for the grid size
What you'll want to have is a square grid for the square tiles, and/or an isometric grid for isometric tiles
Then adjust the sprite Pixels Per Unit value so the tile is the same size as the grid square and fills it correctly
If you want to use isometric tiles that have depth like those do, you will need to configure custom axis tile sorting
And find more info about isometric tilemaps here
Normally though you only pick either the usual square tiles or the bit more complex isometric tiles
but not both
It looks a lot better with a isometric tilemap 🙂 but, i cant figure out where to change the grid size :/
It should be on the Grid gameobject
However, you normally want to change the PPU of the sprite to match the size of the grid, and only change the grid size to have the right height and width ratio
The default grid size is about one unit, but sprite sizes can be wildly different by orders of magnitude if you have not set their PPU
Both setting can be used to scale one to the other
But by modifying the PPU you can keep all tilesets in a standardized unit scale regardless of the sprite resolution
So it took me some work to follow your tips and to do that, but i changed the PPU to 100 as default for assets, and the gridsize to X 9 Y 5.2 Z 9 and that made it look much better and easier to edit 🙂
almost looks 3d ish xd
Is this normal behaviour? It looks like I can't use bezier curves if I want the correct sprites to appear
have a question to ask not sure if this is the right place but I'm making a cookie clicker game and I made all the assets a fairly normal size but in the game scene it's all pixelated is there anything I can do to fix this?
hi everyone, I'm turning to people who know unity well because at the moment I'm trying to learn this software
I just don't really understand the 2d collision system (I'm talking about wall-floor-ceiling collisions, not coin collisions) if I understood correctly there is:
rigibody2D which basically allows unity to take care of everything in terms of physics (you just have to type 3 lines of code) it uses collider2D
raycasts: one line to make it really simple
OnCollisionEnter2D:
and finally there are overlaps
here's everything I know (that I understood)
but so which one should be used for wall-floor collisions (apart from rigibody I don't think we have much control)
or there are other techniques that I don't know
thanks
I found out that it was my aspect ratio
What are you trying to actually do when it collides?
A rigidbody will handle the actual collision impact, with bouncing/sliding, etc., and will return collision info you can code reactions to.
in fact I wonder if that's all there is to make this type of collision with gravity, the rebounds...
because I have the impression that with rigibody we are forced a little bit into the variables of physics
I don't know if it's very clear 😅
#⚛️┃physics can help!
With Unity 6.1 comes Aseprite Importer 1.2.0, with support for Aseprite's tile data.
I've made a video showcasing how easy it is to import and use tile data in Unity 6.1, have a look!
might want to post this in the aseprite server too
https://discord.com/channels/324979738533822464/841792163305095269
Cool, I'll post there as well. Thanks!
I was about just post that here if people didn't already see it.
Would it be okay for a community dev to post a video showing off the other 2D features coming in Unity 6.1 here.
Like the new Tile Set and AutoTile rule tile templates.
I think that should be OK. Nice to bring some attention to the new features available
Thank you. And if the videos has anything that might be a bit wrong due to it being a new feature go ahead and nuke it
So far been loving testing out the new TileSet and Tile Template tools. Just wanting to make a video with more information for people.
Note when I first got my hands on it there was zero documentation (this was during alpha releases so fully understandable), so want to help show off some stuff, specially since I haven't seen anyone mention the new 2D features even in the forum posts for 6.1.
question how do i access the sprite asset library in C#?
nvm spelled it wrong, it was SpriteLibrary
or not?
guess i can't set it in editor
Anyone know how to improve the generated outlines and physics shapes for sliced sprites? The one on the left is generated by unity and the right is edited. It would be nice to get something closer to the one on the right for all of the sliced sprites. Each outline is at least 2 pixels off the edge of the sprite. Can this buffer be removed somehow so the outline is generated on the actual border where the alpha is <254?
Why specificially do you need it to be shaped so?
For sprite outlines I can't think of any advantage
For physics shapes having a pixel perfect collider can be helpful and there are other tools for generating them, but for isometric sprites the colliders are usually at the base rather than contouring the sprite
Replying to this from a month ago, and as a PSA - SpriteRenderers changing their sprite to match another gameobject and appearing to incorrectly batch objects inside the cameras frustum turned out to be an engine bug having to do with sprite masking. It was fixed in version 6000.0.32f1, I didn't think to look at engine update patch notes. Confirmed that updating my Unity version solved the problem (my previous solution of forcing a material property block also solved the problem, it was just had overhead that I'm happy to shed).
I can't seem to get y sorting to work properly. I've been following a bunch of guides with setting the custom axis to 0, 1, 0, setting pivot points, the same sorting layer, etc, but no luck
Well, where are the pivot points
I think I tried most options, center on both, towards the bottom on both, one top one bottom, etc
You'd have to show the setup you have, assuming you want help or advice
If you really did try everything then there'd be little input to add
yeah happy to give more info, just don't know where to start. what would be most helpful?
Could show where the pivots are for those sprites, and the custom axis
it's currently in the center for my player and near the bottom for my lamp post
both are in the same sort layer
and my axis is 0,1,0
With isometric sprites like these the pivot should be at the point where the sprite connects to ground as if it was 3D, meaning at the bottom edge or near it
Verify that the selected quality level uses an URP renderer that uses that specific URP 2D renderer asset
I don't know what that actually means so stand by while I figure it out
I have this as the default
and then when I click on that, I get this
need any camera settings or anything?
In quality tab of projects settings one quality level is selected
That should have your UniversalRP asset which references that 2D renderer asset
Then it should be verified
Hello im just wondering if anyones got any reliable camera for a 2d pixel perfect game? (unity 6)
I know this is a very common problem but no solution ive found has completely worked, some jitter remains which is entirely because of the sprite snapping to the pixel grid, no rigidbody issues or anything
im using the pixel perfect camera component with upscale render textures on, and cinemachine, i really wanna keep the pixel perfect effect on my game, specially for the particles and such, but ive been racking my brain and asking around for a bit now and have no clue what to do, i feel like im really close now that someone gave me a script that should help by offsetting the camera a bit (which a friend also mentioned as a solution he made but i had no idea how to implement that), however i cant figure out the values i need to put here, ive tried a couple things now but still no progress
here are also how the camera and the cinemachine camera look for extra information
am i missing something, is the offset thing a dead end, should i change versions, is there another method without cinemachine or the pixel perfect camera that can work
Your cinemachine camera has damping so it drags behind the sprite, which means they snap to pixels at different intervals that visually causes inevitable jitter
Having no damping is better in theory but doesn't guarantee no jitter because the position of target and camera may get updated on different frames or have floating point inaccuracy, not sure exactly
oh my god im so stupid
it does fix it, i tried taking it off before which didnt work, but that was before i fixed a problem with the rigidbody, and i forgot to test without damping after that, thank you
hey is there a way to make the 2d sprite cutting into a specified slicing length like in half or in other dynamicallyyy slicing the the 2d sprites
Sprite editor has the choice to slice by grid dimensions or by pixel dimensions
Usually you want sprite sheets to be in a specifically formatted grid so you can easily calculate fractional grid slices as well if needed
can i slice like programatically
The idea is like is probabaly like this one above imaage
So you're not talking about slicing sprite assets, but sprite components?
That doesn't really tell me anything
Do you know what the difference of assets and components is when it comes to "slicing" as sprite?
No..
The block is a 2d cube sprite,
I need programmatically like in game want to slice the block(a cube sprite prefab) when it lands on top of another one and see the image u may get the idea after blocks landing
so i have a rock which i want the player to go behind when walking from the back but go in front of the rock when its in front of it